SSH 免密码登录配置

Your aim

  • To automate deploy v2ray to nodes

  • Perform commands from Web TTY

  • Call ssh from a script without entering any passwords

How to do it

First log in on host Poseidon-master as user root and generate a pair of authentication keys.

[email protected]:~> ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa <<< n > /dev/null
[email protected]:~> ssh-copy-id -i ~/.ssh/id_rsa your-v2ray-node-host
[email protected]'s password:

Now you can log into your-v2ray-node-host as root from poseidon-master-server as a without password:

[email protected]:~> ssh your-v2ray-node-host

加入我们