1

If you've seen my previous posts, you would know that I recently finished installing/basic setup of SSH to my ubuntu based server. I've seen one of my dev friends use the following command to get into his server:

user@linux ~$ ssh amy

How do I make it so I can do something similar (in my case ssh dc) to get into my server easier? Remembering the IP and port number is real annoying...

1 Answer 1

3

You can use ~/.ssh/config to create connection profiles, which can set the address, the username, the port number, or any other parameters that are settable from the command line:

Host dc
    Hostname 2001:db8:4321::abcd:efgh
    Port 5453
    User fred

This of course only works on your own computers. If you need a mechanism that works from absolutely everywhere, then you need DNS, i.e. use a domain name (whether your own or a subdomain under a friend's domain). Of course it would still be ssh dc.mydomain.com in that case, and DNS cannot help you with ports or usernames – only IP addresses.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .