On 20 May 2015 22:08, "Stefan G. Weichinger" <[email protected]> wrote:
>
> alias abcd-server='ssh -p 51023 174.183.26.11'  # demo only

Instead of aliases,  you can put this into ~/. ssh/config:
Host abcd
  Port 51023
  Hostname 174.183.26.11

And then you can simply do this:
ssh abcd

As a bonus, the host abcd will work with scp and rsync too. You can
check man ssh_config for some other options to use, for example the
User is very useful too. Here are some more tricks:
https://blog.flameeyes.eu/2011/01/mostly-unknown-openssh-tricks

There is a package net-misc/keychain which is useful to add your keys
to the agent, and handles gpg keys too.

Also note that most ssh servers allow only 3-5 authentication
attempts, so if you have more than 2 keys in your agent, then
connecting to a server with password authentication might fail.

If you need to keep security boundaries but don't want to give up the
convenience of ssh agent forwarding then you can use ssh-ident, as
described here: http://rabexc.org/posts/pitfalls-of-ssh-agents
(unfortunately no gentoo package for that one, but it's just a single
python file).

Have a nice day,
Paul

Reply via email to