ssh config for vps

maybe you can try this first

ssh-keygen					# generate a key pair
ssh-copy-id user@host				# copy plubic key to vps
ssh -i ~/.ssh/private-key-file user@host	# try it now

put this to your ~/.ssh/config file

# Begin vps config
Host vps
    HostName www.baidu.com
    Port 22
    User your-name
    IdentityFile ~/.ssh/private-key-file
    ServerAliveInterval 60
# End vps config
posted @ 2023-01-03 23:31  Song-Tianxiang  阅读(39)  评论(4)    收藏  举报