Linux上实现SSH远程访问不需要密码

本地
1 ssh-keygen -t rsa
2 scp id_rsa.pub user@host:/remote_dir/

远程机
3 www@orange:~/.ssh$ touch authorized_keys
4 www@orange:~/.ssh$ cat ../id_rsa.pub >>authorized_keys
5 chmod 400 authorized_keys
6 rm ../id_rsa.pub

本地
7 ssh user@host

复制远程机上的文件到本地
scp user@host:/remote_file local_dir

请将斜体字换成你的用户名,主机,远程目录或文件,本地目录

posted on 2009-09-10 20:48  ddper  阅读(217)  评论(0编辑  收藏  举报

导航