ssh使用总结

1.互相拷贝文件

步骤:

(1)安装ssh工具:

sudo apt-get install ssh //这个很简单,直接安装。

(2)重启ssh工具:(避免无法使用ssh)

/etc/init.d/ssh restart

这样就完成了ssh工具的安装。

(3)获取远程linux系统的ip地址

ifconfig //使用ifconfig命令从远程端获取ip地址

(4)确保两个系统之间可以互相ping得通

ping //使用ping命令验证,如果无法ping通,请先解决。

(5)将 文件/文件夹 从远程 Ubuntu 机拷至本地(scp)

scp -r username@192.168.0.1:/home/username/remotefile.txt .

(6)将 文件/文件夹 从本地拷至远程 Ubuntu 机(scp)
scp -r localfile.txt username@192.168.0.1:/home/username/

 

2.SSH 远程登入 Ubuntu 机

ssh username@192.168.0.1

posted @ 2016-05-09 14:04  自由飞翔2012  阅读(141)  评论(0编辑  收藏  举报