谢谢各位,用ssky-keygen和ssh-copy-id搞定了,比原来的方式简单。

在 2011年8月3日 下午11:12,LI Daobing <lidaob...@gmail.com>写道:

> 当然,只要你有登录权限即可
>
> 用  ssh-copy-id  simon@sshserver
>
> 2011/8/4 zongsen <simon22...@gmail.com>:
> > 我运行
> > ssh -vvv  simon@sshserver
> > 在2.6.32和3.0的内核中是相同提示:
> > OpenSSH_5.8p1 Debian-7, OpenSSL 1.0.0d 8 Feb 2011
> > Bad tun device 'simon@sshserver'
> >
> > 在3.0内核中我运行
> > ssh -qTfnN -D 1080 simon@sshserver
> > 然后手动输入密码可以正常连接
> >
> > BTW,ssh服务器不是自己的,也能配置公钥吗?
> >
> > 在 2011年8月3日 下午10:41,LI Daobing <lidaob...@gmail.com>写道:
> >>
> >> ssh -vvv  simon@sshserver 然后看一下卡在哪一步,然后在配置做些改动即可,比如我自己的服务器就需要如下的配置
> >>
> >> Host *
> >>        GSSAPIAuthentication no
> >>
> >> 另外,你可以配置公钥,这样就可以直接使用 autossh -f -D 1080 -N  simon@sshserver 来完成整个过程了
> >>
> >>
> >>
> >>
> >> 2011/8/4 zongsen <simon22...@gmail.com>:
> >> > 以前我一直用这样一个脚本自动登录ssh服务器
> >> > #!/usr/bin/expect
> >> >
> >> > set timeout 10
> >> > spawn ssh -qTfnN -D 1080 simon@sshserver
> >> > expect "password:"
> >> > send "passwd\r"
> >> > expect eof
> >> >
> >> > 编译安装了3.0内核以后,这个脚本就不能用了,之前(2.6.32内核)这个脚本执行到send
> >> > "passwd\r"这句后需要等待几秒钟,然后就成功了。现在到这步瞬间就跳掉了。
> >> > 这个问题会是我内核缺少什么模块造成的吗?
> >> >
> >>
> >>
> >>
> >> --
> >> Best Regards
> >> LI Daobing
> >
> >
>
>
>
> --
> Best Regards
> LI Daobing
>

回复