Trouble setting up SSH Password Authentication
Step 4 says:
Create a directory for the public key in your home directory (/home/yourusername) by entering the following command on your Linode:
mkdir .ssh
Firstly where should I be creating this folder if I am using "root" as the login? /home/ does not contain a "root" folder or any others. The root folder is just one level up from /home/. I have tried mkdir .ssh in various places but it doesn't seem to be doing anything. When I run ls I can't see the folder I just tried to create. Could someone give me some pointers on what I might be doing wrong here please?
Thanks
4 Replies
@kekearif:
When I run ls I can't see the folder I just tried to create.
Try:
ls --help | less
and look for an option which reads "do not ignore entries starting with ."
So the .ssh folder will be /root/.ssh
Files and folders beginning with a dot are hidden from usual directory listings. Use "ls -a" to view all files, including hidden ones.
[root@serv:~] pwd
/root
[root@serv:~] ls
[root@serv:~] mkdir .ssh
mkdir: cannot create directory `.ssh': File exists
[root@serv:~] ls -a
. .. .bash_history .bashrc .profile .ssh .viminfo
[root@serv:~] cd .ssh
[root@serv:~/.ssh] ls
authorized_keys