MacOS SSH 进行免输入密码登录

安装 sshpass

1
brew install http://git.io/sshpass.rb

使用 sshpass 免输入密码登录

1
sshpass -p "PASSWORD" ssh user@host

直接在服务器执行语句

1
sshpass -p "PASSWORD" ssh user@host "COMMAND"

参考文档:

Install sshpass via Homebrew on macOS

An Excellent Tool for Non-Interactive SSH Login

Donate - Support to make this site better.
捐助 - 支持我让我做得更好.