Add an authorized key with only one SSH login

Typical procedure for a user to add an authorized key to ~/.ssh/authorized_keys


  • Copy the public key on the remote host from scp

  • Connect to ssh

    and add the key to the file.

This procedure is described, for example, in response to " How do I add an ssh key to a remote server?"

Is it possible to add a key in just one step - just one login to a remote server? An answer that will work on FreeBSD and Debian GNU / Linux (both with OpenSSH) would be great.


source to share

1 answer

ssh-copy-id -i filename_of_key_to_copy




All Articles