I'm very new to Linux so please bare with me. I'm trying to setup a Cloud9 development environment on my CentOS virtual server using SSH but I can't figure it out.

The instructions I'm trying to follow from Cloud9 are here: https://docs.c9.io/run_your_own_workspace.html

I know my server has SSH setup since I can login through PuTTY using the server IP address, username, and password. But the Cloud9 instructions tell me I must save the supplied public SSH key on my server at "~/.ssh/authorized_keys", but I have no idea how to do this, I don't even know where the .ssh directory is.

Can somebody help me figure this out?

closed as off topic by Aaron Copley, mdpc, Ward, Scott Pack, John Gardeniers Jan 25 '13 at 9:50

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Why is it off topic ? isn't it an administration task ? – Pierre de LESPINAY Feb 10 '14 at 12:47

SSH to your remote host and paste the following (this will make the directory if it doesn't exist):

mkdir -p ~/.ssh/

And then copy and paste your public key into ~/.ssh/authorized_keys. If you've already uploaded your key, use:

cat ~/my_key_name.pub >> ~/.ssh/authorized_keys

You're telling your server that your public key is an acceptable form of identification for your user.

Then to make sure no one else can read these keys:

chmod -R 700 ~/.ssh

chmod changes the permissions of files and folders. -R means "do this recursively" and 700 is the equivalent of "let only me read, write, and execute things in this folder."


The ~ means the home directory of the current user (or the user you try to connect to), but watch out adding the authorized_keys file to a user permits the one with the private key to connect to your server (without any password).

  • I figured the ~ out, but there's no .ssh directory there... – zscregan Jan 24 '13 at 22:02
  • Directories that begin with a . are hidden. Use ls -la to list all directory contents, including hidden files. – JasonAzze Jan 24 '13 at 22:06
  • and by default the directory is not created just create it if ls -la does not show it. – Gopoi Jan 24 '13 at 22:10
  • 3
    If your client (the machine you're going to ssh from) is Linux, type man ssh-copy-id and read the manual page for this tool. – JasonAzze Jan 24 '13 at 22:10
  • The machine isn't Linux unfortunately, it's this Cloud9 web based development environment thing. All it gives me is this text and tells me to add it to my authorized_keys file. The text looks like: ssh-rsa aaaaaaa...... myemailaddress@myemailaddress.com – zscregan Jan 24 '13 at 22:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.