Accessing Your Data

Aside from the control panel, there are two other key ways to access your account and data. The first is by remotely working with each machine your account has access to with SSH. The second is with FTP.

Connecting with SSH

You can connect to a machine with SSH. SSH is short for Secure Shell; SSH allows you to use command line for a remote computer securely and robustly.

To connect with SSH, use the following connection information:

  • Host: server.webfaction.com, where server is your server’s name (such as web310 or dweb89). If your account is only associated with one server, you can also connect to username.webfactional.com, where username is your WebFaction account name.
  • Username: your SSH username (your WebFaction account name), or the username of an additional SSH account you have created.
  • Password: your SSH account’s password.

On Mac OS X and Linux systems, you can connect using the command line program ssh. At the command line, enter ssh username@server.webfaction.com and press Enter.

On Windows, you need an SSH client, like PuTTY. To connect to your account with PuTTY:

  1. Start the PuTTY application.
  2. In the Host Name (or IP address) field, enter username@server.webfaction.com where username is your SSH username.
  3. Click the Open button.
  4. The first time you connect, a PuTTY Security Alert appears. Click the Yes button to add the server to the list of known hosts.
  5. In the main PuTTY window, a password prompt appears. Enter your SSH account password and press Enter.

You’re now connected with SSH using PuTTY.

Using SSH Keys

You can use a password-less, key-based SSH authentication system with your WebFaction account.

Linux and Mac OS X

To create and deploy a key with Linux or Mac OS X:

  1. Create a key on your local computer.
    1. Open a terminal session.
    2. Create ~/.ssh, if it does not already exist. Enter mkdir -p $HOME/.ssh.
    3. Switch to the ~/.ssh directory. Enter cd ~/.ssh and press Enter.
    4. Generate your keys. Enter ssh-keygen -t dsa.
    5. A series of prompts appear. Press Enter for each to accept the defaults.
  2. Deploy the key to your server.
    1. Copy the key to your server. Enter scp ~/.ssh/id_dsa.pub username@server.webfaction.com:temp_id_dsa_key.pub and press Enter. When prompted, enter your password.
    2. Open an SSH session to your account. Enter ssh username@server.webfaction.com and press Enter. When prompted, enter your password.
    3. Create ~/.ssh, if it does not already exist. Enter mkdir -p $HOME/.ssh.
    4. Add your key to the authorized_keys file. Enter cat ~/temp_id_dsa_key.pub >> ~/.ssh/authorized_keys and press Enter.
    5. Remove the temporary key file. Enter rm temp_id_dsa_key.pub and press Enter.
    6. Secure the SSH keys. Enter chmod 600 ~/.ssh/authorized_keys and press Enter.
    7. Secure the SSH directory. Enter chmod 700 ~/.ssh and press Enter
    8. Secure your home directory. Enter chmod go-w $HOME and press Enter.
    9. Close the SSH session.
  3. Verify that your key works properly. Enter ssh username@server.webfaction.com and press Enter. The session should begin without a prompt for a password.

PuTTY

To create and deploy a key with PuTTY:

  1. Create a key on your local computer.
    1. Download puttygen.exe.
    2. Run puttygen.exe. The PuTTY Key Generator window appears.
    3. Click to select SSH-2 DSA.
    4. Click the Generate button.
    5. Generate randomness by moving your cursor around until the key is finished.
    6. Click the Save private key button.
    7. Click the Yes button.
    8. Save the file to c:\ssh\id_dsa.ppk.
    9. Click the Save public key button.
    10. Save the file to c:\ssh\id_dsa.pub.
    11. In the Public key for pasting into OpenSSH authorized_keys file field, select and copy the key text.
  2. Deploy the key to your server.
    1. With PuTTY, open an SSH session to your account.
    2. Create the ~/.ssh directoryirectory. Enter mkdir -p ~/.ssh and press Enter.
    3. Open ~/.ssh/authorized_keys in a text editor. For example, enter nano -w ~/.ssh/authorized_keys and press Enter.
    4. Paste the key text such that the key is alone on a single line.
    5. Save and close the file.
    6. Secure the SSH keys. Enter chmod 600 ~/.ssh/authorized_keys and press Enter.
    7. Secure the SSH directory. Enter chmod 700 ~/.ssh and press Enter
    8. Secure your home directory. Enter chmod go-w $HOME and press Enter.
    9. Close PuTTY.
  3. Configure PuTTY to use key authentication.
    1. In the Host Name (or IP address) field, enter username@server.webfaction.com.
    2. In the Category menu, click to expand SSH.
    3. In the Category menu, click to select Auth.
    4. In the Private key file for authentication, enter c:\ssh\id_dsa.ppk.
    5. In the Category menu, click to select Session.
    6. In the Saved Sessions field, enter a name for the connection.
    7. Click the Save button. The connection name appears in the list.
  4. Verify that your key works properly. Double-click the connection name in the list. The session should begin without a prompt for a password.

Troubleshooting SSH Connections

If you’re having trouble connecting with SSH, try these troubleshooting strategies:

  • If you encounter a Connection timed out or Connection refused error, check your internet connection and try again. If your connection is working properly, please open a support ticket. As a security precaution, your IP address might have been temporarily banned after several consecutive failed connection attempts.

  • If you encounter a Permission denied error, make sure your SSH server details and credentials are correct. Confirm that you’re connecting to the correct host name. Likewise, make sure you’re using the correct username and password.

    If you’re using key-based authentication, verify that your private key is available on your local computer and that your public key is deployed to the remote WebFaction server.

Connecting with FTP

You can review, change, and create files in your home directory with the FTP protocol. WebFaction supports FTP and SFTP. SFTP is much more secure than FTP; SFTP is highly recommended.

To connect with SFTP you use the following connection information:

  • Server: server.webfaction.com, where server is your server’s name (such as web310 or dweb89). If your account is only associated with one server, you can also connect to username.webfactional.com, where username is your WebFaction account name.
  • Connection type: SFTP
  • Port: 22
  • Username: your SFTP username (your WebFaction account name), or the username of an additional SFTP account you have created.
  • Password: your SFTP account’s password.

To connect with FTP (for shell users only), substitute the connection type with FTP and the port number with 21.

You can use this configuration information in your FTP client. If you do not have an FTP client, there are many free clients available, such as FileZilla (cross-platform), Cyberduck (Mac OS X), and FireFTP (a Firefox extension).

Changing Your FTP or SSH Password

If you have forgotten your SSH or FTP password, then change your password with the control panel.

  1. Log in to the control panel.

  2. Click your username in the upper right corner. A menu appears.

  3. Click Change passwords. The Change password form appears.

  4. In the Server password section, click Change. A field for the new password and a confirmation field appear:

    _images/password_change_ssh.png
  5. In the New password field, enter a new password.

    See also

    See Strengthening Passwords for important information about choosing passwords.

  6. In the Confirm new password field, reenter your password.

  7. Click the Change password button.

The new password is saved.

Additional Users

If you’re working with a team or need to grant limited access to someone else, you can create additional users. Extra users have their own (unique per machine) username, password, and home directory.

See also

To learn how to grant additional users access to your applications, see Granting Access to Specific Users.

Creating Additional Users

You can create an extra user from the control panel. To create a user:

  1. Log in to the WebFaction control panel.

  2. Click Account ‣ SSH/SFTP users. A list of users appears.

  3. Click the Add new user button. The Create a new user form appears.

  4. In the Username field, enter a username for the new user.

  5. In the Password field, enter a password for the user.

    See also

    See Strengthening Passwords for important information about choosing passwords.

  6. In the Confirm password field, reenter the password.

  7. If applicable, in the Machine menu, click to select a server for the user.

  8. In the Shell menu, click to select the user’s shell type. Select /bin/bash for the typical Bash shell. To limit the new user to SFTP connections only, click to select No shell (sftp only). To allow the new user unsecured FTP access, you must choose a shell.

  9. If needed, click to select the groups to add the user to. Use Ctrl or Command click to select more than one group.

  10. Click the Save button.

The user is created and added to the list.

Removing Additional Users

You can delete an extra user with the control panel. To delete a user:

  1. Log in to the WebFaction control panel.
  2. Click Account ‣ SSH/SFTP users. A list of users appears.
  3. Click the user to be deleted. The user’s details appear.
  4. Click the Delete button. A prompt, Are you sure you wish to delete the user, appears.
  5. To delete the user, click Yes, I’m sure. To preserve the user, click No, Cancel.

If you opted to delete the user, a confirmation message appears and the user disappears from the list.

Backups

WebFaction conducts a weekly backup of all home directories, email accounts, databases, and cron jobs. We retain the last two backup snapshots. While we take great care to protect each server from data loss, we cannot guarantee the existence or completeness of any backups. Customers are responsible for backing up their data.

If you would like to have something restored from our backups, please open a ticket and let the WebFaction support team know what data from what date you would like restored.