[已解决][问题]ssh如何配置使用.shosts文件,从而连接不用输入密码

上网、浏览、聊天、下载等
回复
inwivled
帖子: 8
注册时间: 2007-05-28 18:59

[已解决][问题]ssh如何配置使用.shosts文件,从而连接不用输入密码

#1

帖子 inwivled » 2008-04-23 17:38

系统Ubuntu7.10,ssh是默认安装的

~/.shosts文件内容
localhost +

/etc/ssh/sshd_config文件中设置了
IgnoreRhosts no
RhostsRSAAuthentication yes
HostbasedAuthentication yes

已经ssh过本机,~/.ssh/known_hosts文件已经存在

ssh localhost
的时候要输入密码,怎样设置才可以不用输入密码?
上次由 inwivled 在 2008-04-23 18:04,总共编辑 1 次。
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

#2

帖子 BigSnake.NET » 2008-04-23 17:39

推荐用密钥方式

man ssh-keygen
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
头像
yaoms
帖子: 4952
注册时间: 2007-10-19 14:51
来自: 深圳

#3

帖子 yaoms » 2008-04-23 17:40

用 公钥验证吧,安全又方便

http://wiki.ubuntu.org.cn/SSHHowto#.E5. ... C.E8.AF.81
Nothing 有事请发邮件到 yms541 AT gmail.com
alias 爱慕颇雷尔='mplayer'
inwivled
帖子: 8
注册时间: 2007-05-28 18:59

#4

帖子 inwivled » 2008-04-23 18:03

呵呵,解决了
ssh-keygen -t dsa (输入空的passphrase)
cat .ssh/id_dsa.pub > .ssh/authorized_keys

谢谢BigSnake.NET和yaoms
特别是yaoms给的链接
andrew_t
帖子: 614
注册时间: 2006-12-14 3:00

#5

帖子 andrew_t » 2008-04-23 18:31

路过
回复