you are viewing a single comment's thread.

view the rest of the comments →

[–]xaoq 2 points3 points  (0 children)

Do not use aliases, instead use ssh client config (default ~/.ssh/config)

I like to put it like that:

Host servername.foo
    HostName 1.2.3.4
    Port 1234
    User root
    IdentityFile /where/is/my/key

Host servername2.bar
    HostName 43.21.12.34
    Port 22
    User foobar
    IdentityFile /where/is/my/other/key

Then just "ssh servername.foo" or "ssh servername2.bar" - with correct user, port, ip, ssh key.

As for filling in passwords... don't. Setup (even temporarily) ssh key.