Linux Administration Cookbook
上QQ阅读APP看书,第一时间看更新

SSHing to a different port

If the SSH server you're connecting to is listening on a different port (this is quite common), then you might have to specify the port in question.

The default is 22, but if you've changed this for whatever reason, you could also specify the new port, for example, 2020:

[vagrant@centos1 ~]$ ssh centos2 -p2020
Note this example won't work right now, because we haven't changed the port the server is listening on.