SSH (Secure Shell) access allows you to securely connect to your web hosting server using a command-line interface, enabling you to remotely manage files, configure scripts, and perform administrative tasks. Most modern operating systems include built-in SSH support, while Windows users need to download an SSH client like PuTTY to establish secure connections to their hosting account.
What Is SSH Access and Why Use It?
SSH is a network protocol that creates an encrypted connection between your computer and your web server. This secure tunnel lets you execute commands, transfer files, and manage your hosting environment directly through a command-line interface.
With SSH access, you can perform tasks that aren't available through traditional control panels, such as running custom scripts, managing databases via command line, troubleshooting server issues, and automating repetitive tasks. SSH is particularly valuable for developers and advanced users who need full control over their hosting environment.
Note: Not all hosting plans include SSH access. Check with OBHost to confirm whether your hosting package supports SSH connections.
How to Connect to Your Server Using SSH
Connecting on Windows with PuTTY
Windows doesn't include a built-in SSH client, so you'll need to download and install PuTTY, a free SSH client available at www.chiark.greenend.org.uk/~sgtatham/putty/.
To connect to your server using PuTTY:
- Download and install the PuTTY client from the official website
- Open PuTTY from your Windows Start menu
- In the Session interface, enter your server's hostname or IP address in the "Host Name (or IP address)" field (for example, yourdomain.com or 192.0.2.0)
- Enter the port number in the "Port" field (typically 22 for SSH)
- Select "SSH" as the connection type
- Click "Open" to initiate the connection
- When prompted, enter your cPanel username
- Enter your cPanel password
After successful authentication, you'll see a command prompt where you can execute commands on your server.
Connecting on macOS or Linux
MacOS and Linux operating systems include built-in SSH support through the Terminal application, making the connection process straightforward.
To connect via SSH on macOS or Linux:
- Open the Terminal application
- Type the following command: ssh username@your-server-address (replace "username" with your cPanel username and "your-server-address" with your domain or IP address)
- Press Enter
- If this is your first connection, you'll be asked to verify the server's fingerprint. Type "yes" to continue
- Enter your password when prompted
Once connected, you'll have access to your server's command-line interface.
Using SSH Keys for Enhanced Security
SSH keys provide a more secure alternative to password-based authentication. An SSH key pair consists of a private key (kept on your computer) and a public key (stored on the server). When you connect, the server verifies your identity using these keys without requiring a password.
Many hosting control panels include tools to generate, import, and manage SSH keys directly from your account interface. This allows you to create key pairs, authorize specific keys for access, and revoke keys when necessary.
Benefits of SSH Key Authentication
SSH keys offer several advantages over traditional passwords:
- Enhanced security: Keys are virtually impossible to brute-force, unlike passwords
- Convenience: No need to remember or type passwords for each connection
- Automation: Keys enable automated scripts and scheduled tasks
- Access control: Easy to revoke specific keys without changing passwords
Common SSH Commands for Web Hosting
Once connected via SSH, you can use standard Unix commands to manage your hosting environment. Many Unix-based systems follow POSIX standards, which provide a consistent set of commands across different platforms. For detailed documentation on common commands, refer to the GNU Coreutils documentation.
Some frequently used commands include:
- ls: List files and directories
- cd: Change directory
- mkdir: Create a new directory
- rm: Remove files or directories
- cp: Copy files
- mv: Move or rename files
- chmod: Change file permissions
- nano or vi: Edit text files
Troubleshooting SSH Connection Issues
If you're having trouble connecting to your server via SSH, check these common issues:
- Verify that SSH access is enabled on your hosting account
- Confirm you're using the correct hostname, port number, username, and password
- Check that your firewall isn't blocking SSH connections (port 22)
- Ensure your hosting provider allows SSH connections on your plan
- If using SSH keys, verify that the public key is properly installed on the server
Frequently Asked Questions About SSH Access
Do all hosting plans include SSH access?
No, SSH access is not available on all hosting plans. Many shared hosting packages restrict or disable SSH for security reasons. At OBHost, SSH access availability depends on your specific hosting plan. Contact our team at sales@obhost.org to confirm whether your current or desired plan includes SSH access.
Is SSH access secure for managing my website?
Yes, SSH is one of the most secure methods for remote server management. All data transmitted through an SSH connection is encrypted, protecting your login credentials and commands from interception. Using SSH keys instead of passwords further enhances security by eliminating the risk of password theft or brute-force attacks.
Can I use SSH to transfer files to my server?
Absolutely. SSH includes SFTP (SSH File Transfer Protocol) and SCP (Secure Copy Protocol), both of which allow secure file transfers. You can use command-line tools or graphical SFTP clients like FileZilla to upload and download files through your SSH connection. This method is more secure than traditional FTP because all file transfers are encrypted.
What should I do if I forget my SSH password?
Your SSH password is typically the same as your cPanel account password. If you've forgotten it, you can reset your password through your hosting control panel or by contacting support. Alternatively, if you've set up SSH key authentication, you can connect without a password using your private key.
Our support team is available 24/7 to help with SSH access setup, troubleshooting, and any questions about using command-line tools on your hosting account. Visit our contact page or email support@obhost.org for assistance.