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"
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"