Linux Machine copy public key to ssh server

From AcrodusWiki
Revision as of 16:54, 30 September 2024 by Alex (talk | contribs) (Created page with "One line command to copy ssh public to ssh server to allow for ssh pub priv key authentication. ssh-copy-id -i ~/.ssh/id_rsa.pub alex@git.acrodus.uk ssh-copy-id : command -i : option to specify the file with the public key user:host : in this case this was for setting up git server which uses ssh ensure that when attempting to use ssh to connect to server that the default is using the private key for the public key you sent. This can be configured in /etc/ssh.conf or...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

One line command to copy ssh public to ssh server to allow for ssh pub priv key authentication.

ssh-copy-id -i ~/.ssh/id_rsa.pub alex@git.acrodus.uk

ssh-copy-id : command -i : option to specify the file with the public key user:host : in this case this was for setting up git server which uses ssh

ensure that when attempting to use ssh to connect to server that the default is using the private key for the public key you sent. This can be configured in /etc/ssh.conf or specified with command line option when using ssh.