Been using UNIX since the late 80s; Linux since the mid-90s; virtualization since the early 2000s and spent the past few years working in the cloud space.
Location
Alexandria, VA, USA
Education
B.S. Psychology from Pennsylvania State University
An easier method for copying your public key to a remote host is to use the ssh-copy-id command.
Also, if you have multiple SSH keys on your keyring, you can create scenarios where the git-remote will give you a "too many authentication failures" error due to the ssh-agent presenting the wrong key(s) prior to the correct key.
Using the SSH config file (~/.ssh/config) can come in handy here.
Specify the remote server you are connecting to using the Hoststatement.
Within the host statement you can specify the options that differ from the defaults for that host including but not limited to username and identity.
Host example.com
User fred
Identity File ~/.ssh/example-key
Then when you connect to the example.com server it will use the options you have specified. On some OSes this also provides auto-completion for the SSH command.
An easier method for copying your public key to a remote host is to use the
ssh-copy-id
command.Also, if you have multiple SSH keys on your keyring, you can create scenarios where the git-remote will give you a "
too many authentication failures
" error due to the ssh-agent presenting the wrong key(s) prior to the correct key.I do second
ssh-copy-id
. Got to know about it few weeks ago and it's such a helper!Using the SSH config file (~/.ssh/config) can come in handy here.
Specify the remote server you are connecting to using the
Host
statement.Within the host statement you can specify the options that differ from the defaults for that host including but not limited to username and identity.
Then when you connect to the example.com server it will use the options you have specified. On some OSes this also provides auto-completion for the SSH command.
The SSH Config Man page has all the options you can specify linux.die.net/man/5/ssh_config