Linux 免密登录以及远程执行命令

step 1. 

ssh-keygen

step 2.

ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.1.100

step 3.

ssh root@192.168.1.100

远程执行命令 


ssh root@192.168.1.100 "df -h"

多条


ssh root@192.168.1.100 "pwd; cat hello.txt"
For example, "name@something.com". If someone replies to you it will be via email.
For example, "http://someaddress.com"