echo “alias ssh-to-username=’ssh username@hostname’” >> ~/.zshrc
- 将
username
和hostname
替换为你的服务器信息 -
source ~/.zshrc
重新加载更改后的zshrc文件 -
ssh-to-username
使用别名
一条命令即可登录你的ssh服务器
echo “alias ssh-to-username=’ssh username@hostname’” >> ~/.zshrc
username
和hostname
替换为你的服务器信息source ~/.zshrc
重新加载更改后的zshrc文件ssh-to-username
使用别名