ubuntu ssh

ssh下载

sudo apt-get install openssh-server

sudo apt-get install openssh-client

如果下载不了,在这下载http://archive.ubuntu.com/ubuntu/pool/main/o/openssh/

 

配置

$scp .ssh/authorized_keys test@10.0.0.182:/home/test/
The authenticity of host '10.0.0.182 (10.0.0.182)' can't be established. 
RSA key fingerprint is 11:fa:8b:27:68:89:5c:83:b0:16:ea:4b:8b:41:4b:00. 
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.0.182' (RSA) to the list of known hosts. 
Permission denied (publickey). 

将/etc/ssh/sshd_config文件中的PasswordAuthentication no 改为PasswordAuthentication yes,

然后重启 /etc/init.d/ssh restart

 

查看ssh是否运行

ps aux | grep ssh

 

scp用法:

scp 计算机名@IP:文件名    本机文件名

如: scp xxx@192.168.16.104:~/work/a.txt ./a.txt

scp挎贝目录

        scp -r xxx@192.168.16.104:~/work ./work

 

posted @ 2014-09-11 13:56  冰雨的日子  阅读(137)  评论(0编辑  收藏  举报