SSH执行远程命令和传送数据

$ ssh user@host 'mkdir -p .ssh && cat >> .ssh/authorized_keys' < ~/.ssh/id_rsa.pub ##将本地公钥id_rsa.pub传给远程主机

 

posted @ 2017-02-25 15:55  Hopkings  阅读(2233)  评论(0编辑  收藏  举报