HELP! Shell access!


I used somebody’s advice on how to log in to your shell account that was posted on the Kbase:

** This works using the default setup on mac os x (tcsh, BSD)

To generate a secure public/private key pair to log in securely, and without a password (if you want).

from the command line (on your box, not logged into ftp, and replacing “username” and “yourdomain” with yours) type:

ssh-keygen -d

hit enter three times

scp ~/.ssh/

enter password


You’re logged in!

It didn’t log me in, and now my site won’t show up at all (! Somebody, please help!!

Looks like you messed up the permissions on your home directory. I fixed it for you.

I don’t see a .ssh directory for that user, so I think you messed up some step somewhere.

This one-liner will probably work:
ssh target ‘test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys && chmod 0600 .ssh/*’ < ~/.ssh/

replacing “target” with your domain name

THANK YOU a trillion times over- I’ve never gotten so scared over a programming thing in my life!!



Please tell me what that one line will do, exactly. I’m hesitant to do anything at all in the shell, but I really need to get this account set up- my friend will be installing PHP for me, so I need for him to have the shell access through this account.

Also, when you say use “your domain name”, do you mean,, or

Ok - from rereading your original question, I think you’re way misunderstanding the whole thing.

You don’t need to do what you were trying to do to login to your shell account. You need to do that if you’re trying to login from another UNIX or Mac OSX machine and want to login without typing in a password.

In your case, you don’t even have shell access to your user machine, so this won’t work. I think what you really want to do is to enable shell access for that user from the web panel under Users -> Users -> Edit.

By the way, this isn’t really a programming question at all, so I’m moving it to “General Troubleshooting”.

If you still want to understand what that line does, it creates the directory “.ssh” on the remote machine if it doesn’t already exist, then puts the contents of your local ssh public key into .ssh/authorized_keys (on the remote machine) so that you can login without a password.

Doesn’t matter.

Okay, that makes things clearer, except for the fact that I had enabled that user to have shell access earlier this morning (I even got the email from Dreamhost saying that a particular shell account had been activated). I guess I will try it again from my web panel to see if that changes anything.

Still an ftp only user. Maybe you edited the wrong user?

You have to select “enable shell access”, choose a shell (bash or tcsh are the options available from the panel), and then submit.

Actually, that seemed to do it. Originally, I had selected tcsh, but I just changed it to bash, saved the changes, and waited 5 minutes. I just logged in and I got into it just fine.

Thank you for all of your help!

This didn’t working for me.

I read that ssh-keygen won’t work if the usergroup is readable and has other people in it.

$ cd ~/.ssh
$ chmod 700 *

Now it works!