I'm working on getting keys set up so I can easily log in to my servers. I know I can do things like: "ssh user@example.com", but I have some servers that don't have a domain name. They have ip addresses (mainly database servers). Is there a way to type in something other than "user@1.2.3.4.5" and instead type something like "user@myfavdatabase"? Basically a way to create an alias for ip addresses or something?
feedback
|
|
You can use an ssh config file in your home directory. For example:
See man ssh_config for more information. | |||||||
feedback
|
|
Also, since you wrote about keyS in plural, adding the IdentityFile directive could be also useful in your ~/.ssh/config
Also remember that you can create keys without password just by pressing enter when ssh-keygen prompts for a password. If you go the more secure way of having a password, you can always add the password once to the ssh-agent using
and typing your password only once. The ssh-agent will cache your password for future connections, at least until next logout or reboot. | |||
|
feedback
|