Defaulting SSH to a non-standard host port

If the SSH server on a host has been configured to listen on a non-standard port for example port 92 then normally we would connect with:

ssh -p 92 theserver.tld

Remembering and typing that -p 92 switch can be a pain in the |
Configuring ssh on the client can ease the pain:

vi /etc/ssh/ssh_config

Add the follow lines above Host *

Host theserver.tld
Port 92

 

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>