cygwin安裝sshd服務並實現無密碼登入
這篇文章主要是為我在win7(64位)下搭建hadoop環境所準備的。首先參照在這篇文章在cygwin中安裝所必須得軟體包,然後如下進行操作:
[email protected]~ $ ssh-host-config *** Info: Generating /etc/ssh_host_key *** Info: Generating /etc/ssh_host_rsa_key *** Info: Generating /etc/ssh_host_dsa_key *** Info: Generating /etc/ssh_host_ecdsa_key *** Info: Creating default /etc/ssh_config file *** Info: Creating default /etc/sshd_config file *** Info: Privilege separation is set to yes by default since OpenSSH 3.3. *** Info: However, this requires a non-privileged account called 'sshd'. *** Info: For more info on privilege separation read /usr/share/doc/openssh/READ ME.privsep. *** Query: Should privilege separation be used? (yes/no) no *** Info: Updating /etc/sshd_config file *** Query: Do you want to install sshd as a service? *** Query: (Say "no" if it is already installed as a service) (yes/no) yes *** Query: Enter the value of CYGWIN for the daemon: netsec] netsec *** Info: On Windows Server 2003, Windows Vista, and above, the *** Info: SYSTEM account cannot setuid to other users -- a capability *** Info: sshd requires. You need to have or to create a privileged *** Info: account. This script will help you do so. *** Info: You appear to be running Windows XP 64bit, Windows 2003 Server, *** Info: or later. On these systems, it's not possible to use the LocalSystem *** Info: account for services that can change the user id without an *** Info: explicit password (such as passwordless logins [e.g. public key *** Info: authentication] via sshd). *** Info: If you want to enable that functionality, it's required to create *** Info: a new account with special privileges (unless a similar account *** Info: already exists). This account is then used to run these special *** Info: servers. *** Info: Note that creating a new user requires that the current account *** Info: have Administrator privileges itself. *** Info: No privileged account could be found. *** Info: This script plans to use 'cyg_server'. *** Info: 'cyg_server' will only be used by registered services. *** Query: Do you want to use a different name? (yes/no) yes *** Query: Enter the new user name: sony *** Query: Reenter: sony *** Warning: Privileged account 'sony' was specified, *** Warning: but it does not have the necessary privileges. *** Warning: Continuing, but will probably use a different account. *** Warning: The specified account 'sony' does not have the *** Warning: required permissions or group memberships. This may *** Warning: cause problems if not corrected; continuing... *** Query: Please enter the password for user 'sony': *** Query: Reenter: *** Info: The sshd service has been installed under the 'sony' *** Info: account. To start the service now, call `net start sshd' or *** Info: `cygrunsrv -S sshd'. Otherwise, it will start automatically *** Info: after the next reboot. *** Info: Host configuration finished. Have fun!
$ net start sshd
發生系統錯誤 1069 --- 表示由於登入失敗而無法啟動服務
解決方法:在cmd中輸入services.msc即可開啟windows的服務,在服務中把密碼改對就可以了。
(在上面配置ssh的過程中我的使用者名稱是:sony 密碼是:123456)
sshd服務裝成功如下:
[email protected] ~ $ net start sshd
CYGWIN sshd 服務正在啟動 .
CYGWIN sshd 服務已經啟動成功
接下來是配置無密碼登陸:
[email protected] ~ $ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/sony/.ssh/id_rsa):
Created directory '/home/sony/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/sony/.ssh/id_rsa.
Your public key has been saved in /home/sony/.ssh/id_rsa.pub.
The key fingerprint is:
e8:38:5e:e3:bb:cf:76:03:61:5f:f2:68:ed:a3:49:db [email protected]
The key's randomart image is:
+--[ RSA 2048]----+
| |
| |
| |
| .o . . |
| ..So * |
| o . + o |
| o + o.. |
| . + o..o+o |
| . +=o.+oE. |
+-----------------+
[email protected] ~ $ cd .ssh/
[email protected] ~/.ssh $ ls
id_rsa id_rsa.pub
[email protected] ~/.ssh $ cp id_rsa.pub authorized_keys
[email protected] ~/.ssh $ ls
authorized_keys id_rsa id_rsa.pub
驗證如下:
[email protected] ~/.ssh $ ssh localhost
The authenticity of host 'localhost (::1)' can't be established.
ECDSA key fingerprint is 5f:21:b1:24:80:92:f6:af:3e:e3:a8:f9:cb:a4:4f:ec.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
[email protected] ~ $ who
sony tty0 2011-11-25 15:42 (::1)
搞定 ~_~
相關推薦
cygwin安裝sshd服務並實現無密碼登入
這篇文章主要是為我在win7(64位)下搭建hadoop環境所準備的。首先參照在這篇文章在cygwin中安裝所必須得軟體包,然後如下進行操作: [email protected]~ $ ssh-host-config *** Info: Generating /
Linux PXE遠程安裝服務 並實現KIckstart無人值守安裝
網絡工作於Client/Server的網絡模式,支持工作站通過網絡從遠端服務器下載映像,並由此支持通過網絡啟動操作系統,在啟動過程中,終端要求服務器分配IP地址 實驗目標:部署PXE遠程安裝服務 、並實現KIckstart無人值守安裝 server_args = -s /var/lib
Windows Server 2003安裝IIS服務並配置WEB站點
程序 admin server 訪問網站 targe 詳細 window 知識 兩個 一、安裝IIS服務 簡介 IIS(Internet Information Server,互聯網信息服務)是一種Web(網頁)服務組件,其中包括Web服務器、FTP服務器、NNTP
lnmp 安裝FTP服務 並配置FTP用戶
image pureftpd col 顯示 pan code nmp 成功 ref lnmp 默認是不帶FTP服務的,需要的童鞋要自行安裝.步驟也很簡單 一,進入lnmp目錄,找到pureftpd.sh 二,直接運行該腳本 ./pureftpd.sh
0543-實踐配置apahe服務並實現基於虛擬主機的實踐
linux1 apache下載: 登錄官網:http://www.apache.org/ 根據下圖提示下載 下載版本為: httpd-2.2.34.tar.gz (二進制源碼)2 在web02機器配置、編譯、安裝apache 2.1 apache 安裝####apac
centos7系列安裝vnc服務並授權用戶訪問
VNC tigervnc-server wireshark 今天心情不錯 寫個文章把,好久沒寫了,今天無聊看了半天內涵段子笑了半天,也每人找 我玩,就寫了一個博客,希望你們能看懂,不懂的可以聯系我。 由於最近服務器流量偏高導致一些問題,需要給網絡組那邊弄一
安裝samba服務器實現Linux mint和Windows共享文件
etc https int 修改 tps 視頻 conf sudo 通用 安裝samba服務器實現Linux mint和Windows共享文件在Linux mint普通用戶下執行命令:sudo apt-get install samba,安裝samba,打開smb.conf
CentOS7 yum安裝Apache(httpd)並實現多域名配置
系統環境:騰訊雲CentOS 7.2 x64 一、Apache(httpd)安裝 安裝 yum install httpd 1 設定自啟 systemctl enable httpd.service 1 二、軟體配置 編輯httpd.conf就夠了,httpd.co
centos通過yum方式安裝http服務並啟動
1.安裝 yum install -y httpd 2.檢視Apache是否被安裝 [[email protected] ~]# find / -name 'httpd' /etc/sysconfig/httpd /etc/httpd /etc/logrotate.d
Winform連線SQL資料庫並實現使用者登入
首先介紹一下SqlConnection類 SqlConnection類表示一個到SQL Server資料庫的開啟的連線,此類不能被繼承 SqlConnection類的建構函式有如下3個 SqlConnection:初始化 SqlConnection 類的新例項。 SqlC
Ubuntu系統上叢集之間ssh實現無密碼登入
準備條件: 安裝ssh-serversudo apt-get install openssh-server安裝ssh-clientsudo apt-get install openssh-clie
CentOS7 安裝telnet服務並設定開機啟動
安裝telnet服務端和客戶端及守護程式 yum install telnet-server.x86_64 yum install telnet.x86_64 yum install xinetd.x86_64 設定開機啟動 systemctl enable xinet
centos7 下安裝canal,並實現將mysql資料同步到redis
簡介:canal為阿里巴巴產品,它主要模擬了mysql的Slave向Master傳送請求,當mysql有增刪改查時則會出發請求將資料傳送到canal服務中,canal將資料存放到記憶體,直到客戶端程式(canal服務端和客戶端程式都是由java編寫,且客戶端邏輯由我們藉助c
jsp連線oracle資料庫並實現簡單登入功能,來自網路,部分修改。(亞信聯創實習)
共三個頁面:login.jsp、loginconf.jsp、loginsucess.jsp 使用者首先開啟login.jsp輸入使用者名稱及密碼,此時login.jsp會將輸入的使用者名稱及密碼提交到loginconf.jsp loginconf.jsp通過初始化連線資料庫
MySQL資料庫建立使用者並實現遠端登入
1.建立使用者CREATE USER 'username'@'host' IDENTIFIED BY 'password';2.使用者授權GRANT privileges_name privilege
windows下搭建nginx服務並實現基於埠與路徑轉發
windows下搭建nginx nginx下載 nginx使用 nginx不能通過雙擊nginx.exe啟動,需要在cmd命令列中通過命令啟動。 啟動cmd命令列,進入nginx所在路徑 啟動命
Linux centos 安裝redis服務並後臺啟動
網上看了大神的文章,感覺不夠清楚,如果是小白的話估計無法完全正確操作,所以在大神的基礎上修改了下,方便純小白操作 1,下載redis安裝包 wget http://download.redis.io/releases/redis-3.0.6.tar.gz 2,解壓安裝包
在Ubuntu16.04安裝OpenCV3.1並實現USB攝像頭影象採集
硬體平臺:Windows7 64 bit + USB攝像頭C270 軟體平臺:VMware® Workstation 12 Pro+ Ubuntu16.04 + arm-linux-gcc4.3.2 + OpenCV3.1 一、知識補充 1.
server 2016 安裝WDS服務並下發操作系統
ado 般的 技術分享 term windows 計算機 bios 無法 win WDS的全稱為Windows部署服務,主要應用於大中型網絡中的計算機操作系統的批量化部署。通過使用WDS可以管理系統映像和無人參與安裝腳本,並提供人工參與安裝和無人參與安裝的方式,大大提升我們
【Python3爬蟲】破解時光網登入加密引數並實現模擬登入
一、站點分析 MTime 時光網是一個電影媒體與電商服務平臺,而這次做的模擬登入則是依靠其手機端站點,站點地址為:https://m.mtime.cn/#。切換到登入頁面,再分別輸入賬號和錯誤的密碼,點選登入,登入失敗,截圖如下: 開啟開發者工具, 選擇“Network&r