Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Jul 06, 2015 7:37 am 
Offline
Senior Newbie

Joined: Mon Jul 06, 2015 7:30 am
Posts: 6
Hey, I am a complete newbie to setting up Linode. I have managed to install Ubuntu on my Linode and I am now going through the securing your server guide at: https://www.linode.com/docs/security/se ... ur-server/. I have managed to create the keys using ssh-keygen and I have uploaded the public one. I am doing all work using "root" as login. The file I uploaded is in the root folder.

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


Top
   
PostPosted: Mon Jul 06, 2015 2:54 pm 
Offline
Linode Staff

Joined: Wed Jul 01, 2015 10:33 am
Posts: 59
If you continue to work in root, you should still have a home directory that you can work with. The .ssh folder would be located in ~/.ssh. ~ is the shortcut for your home folder. Otherwise, I would suggest setting up a new user like the guide shows and giving it sudo permission.


Top
   
PostPosted: Mon Jul 06, 2015 3:38 pm 
Offline
Senior Member

Joined: Fri Feb 13, 2015 8:12 pm
Posts: 101
kekearif wrote:
When I run ls I can't see the folder I just tried to create.

Try:
Code:
ls --help | less

and look for an option which reads "do not ignore entries starting with ."


Top
   
PostPosted: Wed Jul 08, 2015 11:52 am 
Offline

Joined: Mon Jun 01, 2015 2:49 pm
Posts: 1
If I'm not mistaken, Ubuntu comes with a .backrc file with some helpful aliases: one is "ll". Checkout ~/.bachrc


Last edited by webbydoug on Wed Jul 08, 2015 1:50 pm, edited 1 time in total.

Top
   
PostPosted: Wed Jul 08, 2015 1:33 pm 
Offline
Senior Member

Joined: Sun Aug 31, 2008 4:29 pm
Posts: 177
Root's home directory is /root

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.

Code:
[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

_________________
sleddog


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group