upload an ssh key to my linode?
I've been having an issue to where I cannot get my ssh key added to my Linode. I'm using Windows 10 with a linode running Ubuntu. When I tried to use the secure copy command, but that didn't work. I've had success with getting it up to Linode using the cat command. However, when I put in: cat ~/.ssh/id_rsa.pub |ssh kidbrailler@123.456.789.0 "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys" It tells me that it can't create the folder, permission denied. I've turned on my root login, and my password authentication options in the /etc/ssh/sshd_config file, in hopes that would help me fix this problem, but I'm still having no success. Please help. I'm using Windows 10. I use Windows' Power Shell to login into my Linode. Thank you. Please note I used an example IP instead of my own.
1 Reply
The cat
command, short for concatenation is just printing the contents of a file to standard output. It does not make changes to files. If you're unfamiliar with any command, I'd suggest running man $command
to access the man page, which will provide more information about its intended use.
We have step-by-step instructions for doing this with Windows 10 in our Secure Your Server - Harden SSH Access guide. The steps there are a little different, especially for doing this from a Windows 10 machine.