I'm trying to copy a /id_rsa.pub to another machine with the command
cat .ssh/id_rsa.pub | ssh firstname.lastname@example.org 'cat >> .ssh/authorized_keys'
but keep getting the error
sh: .ssh/authorized_keys: Is a directory
I created the directory with the following commands
mkdir ~/.ssh chmod 700 ~/.ssh touch ~/.ssh/authorized_keys
The output from the command on the target machine
ls -l /root/.ssh
is "total 0"