Default login folder for domain

I have hosted on DreamHost.

I can ssh/ftp/sftp to no problem.

But the default directory I’m logged into is my user directory, not the directory.

So, I always have to cd into, or provide it as my initial path in my FTP client, etc.

Is there any way to make it smart enough so that if I log into instead of, it realizes I’m trying to administer a particular domain, and not my entire user account?

You’re logging in as a user, not a domain, so it puts you in the user’s directory. My FTP client allows me to pick a remote directory as my default, so I automatically end up in


Right. I realize I can enter an initial path in my FTP client to get to the directory. I’m wondering if there’s a way around that.

What I’m expecting is that based on the fact that I’m logging into instead of, I should automatically end up in the directory. I mean, it makes sense, doesn’t it?

It’d be nice if it made sense, but it won’t. In Apache, a browser tells it what domain it’s asking for. In FTP, the client doesn’t tell the server what domain it’s asking for - just the username.


Yeah, oh well. Thanks for your help.

I don’t know of any way to differentiate between logging into the server vs your domain, but for SSH you can add:
to your .bash_profile file. This way when ever you log into SSH with that user, you’ll automatically be put into your domain directory. if you need you’re home directory, just “cd …”. I don’t know any way to set this for FTP though.

–Matttail - personal website

While this would work for the one domain, I believe the original poster has multiple domains and wanted a situation where SSH would automatically CD to the correct domain directory, depending on the domain (hostname) he used for the log-in. Of-course, they could expand apon your suggestion by creating a unique user to control each domain then modifying each users bash profile.

As for FTP; I think this is probably the easiest to configure, but it will need to be done at the client, not the server. Simply create as many site log-ins as required, in the clients site manager, and configure each with a different remote path.

Overall, I think it is all more hassle than it is worth. :slight_smile:


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )