如果我们不想每次ssh 又要输用户名又要很长的hostname , 可以配额 ~/.ssh/config

例子:


➜  ~ cat ~/.ssh/config

Host jenkins
Hostname jenkins.devops.esolution.services
Host knime
Hostname 10.241.18.128
User ubuntu
IdentityFile ~/.ssh/jenkins-autodeploy
Host *
StrictHostKeyChecking no
ServerAliveInterval 240
User 5120szx-lulv@cds.testo