Enabling Shell Access

From DreamHost
Jump to: navigation, search

Header starting.png

DreamHost provides shell access to all of its customers, but it needs to be specifically enabled for each user added to a customer's account. In the three sections below you'll find information on creating a new user with FTP/SFTP/shell access and modifying an existing user to grant or remove FTP/SFTP/access.

Creating a new user with FTP and shell access

  1. Visit the (USERS > MANAGE USERS) page of the control panel.
  2. Click the [ Add New User ] link found on that page.
  3. Check the 'Shell account' option. This also grants FTP access to the user.
    1. To use SFTP (a secure version of FTP), you must turn ON the option "Shell: Enable ssh/telnet". (SFTP uses the SSH protocol to transfer files.)
    2. Leave the 'Type' as it is unless you need it to be something other than bash.
  4. Select a username for the person. This is what they will use to login.
  5. Enter the Full Name of the person you're creating the account for.
  6. Either allow the control panel to generate a password for this user or create one of your own.
    1. If allowing the control panel to generate a password, you will be presented with it on the page that follows.
  7. Click the 'Add User' button.

Keep in mind that it takes about 20 minutes for this change to take effect.

NOTE: On shared hosting, you won't see the webroots for your domains on this new shell account. You can access the main FTP user on the account though:

Me: how can I see the webroots for the different domains i have on the account?

Me: all the webroots are under the home directory of the FTP user that was set up with the account - /home/ftpuser/

Me: and i can't get to that directory

DreamHost: You can't jump between the two on shared hosting. Well I mean you could - you could use su -ls /bin/bash ftpuser and get a shell session as that user.

DreamHost: But you'd need the ftpuser password.

Me: does "ftpuser" user have a shell?

DreamHost: No, but since you have a shell user, you can jump to that user anyways using that command.

PRO TIP: Use a screen session so that you don't have to do the above each time you log in. Put "screen -x" in the ~/.bash_profile of the shell user so i resume it on login

Enabling/Disabling shell access for an existing user

  • Shell access also provides SFTP access for the user.
  • Unless the "Disallow FTP?" option is checked, it also provides FTP access to the user.
  1. Visit the (Users -> Manage Users) page of the control panel.
  2. Click the [ Edit ] button to the far right of the corresponding user.
  3. Select the "Shell account" option.
    1. Leave the "Shell Type" as it is unless you know what you're changing.
  4. Click 'Save Changes' to save the change.

Keep in mind that it takes about 10 minutes for this change to take effect.

Enabling/Disabling SFTP only access for an existing user

  1. Visit the (USERS > MANAGE USERS) page of the control panel.
  2. Click the [ edit ] link located next to the user you'd like to enable shell access for.
  3. Check the 'SFTP account' box for that user.
    1. Leave the 'Type' as it is unless you need it to be something other than bash.
  4. Click 'Save Changes' to save the change.

Keep in mind that it takes about 20 minutes for this change to take effect.