I'm tired of always having to type my password when connecting to the same remote hosts.
How do I setup public key authentication so that I can use the same key to connect to multiple hosts without having to type the password every time?
To upload a key using Tectia Client version 6.1.0 or newer using ssh-broker-ctl
The instructions below assume that you have Tectia Client version 6.1.0 or newer. If you have an older version of Tectia Client or would prefer to do this manually see this question.
$ ssh-keygen-g3 mykey
This will prompt for a passphrase for the key and create a public key pair (mykey and mykey.pub) in the following location:
$ ssh-broker-ctl list-keys
This will output something like:
You'll get prompted for password for remotehost and the key is automatically uploaded.
Alternatively instead of specifying the path to the key you can give the key id (from the output in step 3):
After this when connecting to remotehost you'll get prompted for the passphrase for your key (the key only needs to be decoded once as long as the ssh-broker-g3 process is running):
This should work against any SSH server.
*Note that public key authentication must be allowed by the server configuration.