SSH 无需输密码登陆 passwordless logins using ssh-agent

;配置

vi /etc/ssh/sshd_config

;保证如下属性:

;RSAAuthentication yes

;PubkeyAuthentication yes

 

 

;生成公钥

skx@lappy:~$ ssh-keygen -t rsa
Generating public/private rsa key pair. 
Enter file in which to save the key (/home/skx/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/skx/.ssh/id_rsa. 
Your public key has been saved in /home/skx/.ssh/id_rsa.pub.

;上传公钥
ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
 
/etc/init.d/sshd restart
 
;OK了
ssh 192.168.0.1
 
另:

Address *.*.*.* maps to localhost, but this does not map back to the address – POSSIBLE BREAK-IN ATTEMPT!
解决办法:
vi /etc/ssh/sshd_config

GSSAPIAuthentication yes
修改成:
GSSAPIAuthentication no

 

 

http://www.debian-administration.org/articles/152

 
 
 
 
 

你可能感兴趣的:(password)