通过 storm ssh 连接 vps
Vultr 创建一个 VPS 实例。在server管理页面获取刚新建的VPS username password ip_address。
stormssh 文档 https://stormssh.readthedocs.io/en/master/index.html
install storms[sudo] pip install stromssh
create stormssh itemstorm add vpsname username@ip_address:port
1
success vps added to your ssh config. you can connect it by typing "ssh vps".
list vpsstorm list
1
2
3SailerNote ~/.ssh storm list
Listing entries:
vpsname -> username_address:port
create ssh public and private key
formatssh-keygen -f path -t [rsa] -C string
examplessh-keygen -f ~/.ssh/id_rsa.vpsname -t rsa -C "test@email.com"
copy public key to vps
formatssh-copy-id [-i [identity_file]] [user@]machine
examplessh-copy-id -i ~/.ssh/id_rsa.vpsname.pub username@ip_address
ssh-copy-id -i ~/.ssh/id_rsa.vpsname.pub vpsname
this step need password
ssh config
before1
2
3
4Host vpsname
hostname 1.1.1.1
user username
port 22
after1
2
3
4
5
6
7
8Host vpsname
identityfile /Users/SailerNote/.ssh/id_rsa.vpsname
user root
usekeychain yes
preferredauthentications publickey
hostname 1.1.1.1
port 22
addkeystoagent yes
connect vpsssh vpsname