原文来源:
https://serverfault.com/questions/215007/associate-name-with-ip-for-ssh
1. 设置
设置语法:
# ~/.ssh/config
Host database
HostName <real IP address or hostname here>
User username
使用例子:
# ~/.ssh/config
Host database
HostName 10.125.128.245
User wukong
2. 使用
ssh database #等效 ssh wukong@10.125.128.245