Connecting to a Server via SSH
Prerequisites
SSH Client: Ensure you have an SSH client installed. Most Linux/macOS systems have it pre-installed. For Windows, you can use tools like PuTTY or Windows Subsystem for Linux (WSL).
Server Details: You'll need your server's IP address or hostname, along with your username and password (or SSH key). These details are typically found on your hosting provider's server management page.
IPv4: 192.168.1.100
Connect via SSH: `ssh root@192.168.1.100`
Root Password: ********
Step 1: Open Terminal or Command Line
- Linux/macOS: Open the Terminal application.
- Windows: Open Command Prompt, PowerShell, or your preferred SSH client.
Step 2: Connect to the Server
Use the following command to connect:
ssh username@server_ip_or_hostname
- Replace
username
with your actual username on the server. - Replace
server_ip_or_hostname
with the server's IP address or hostname.
Example:
ssh john_doe@192.168.1.100
Unknown Host Key Warning
If the system warns you about an unknown host key, confirm the connection by typing yes
.
Step 3: Authenticate
- Password Authentication: If prompted, enter your password. Note that the password will not be visible as you type.
- SSH Key Authentication: If you have set up SSH keys, the connection will be established automatically without a password.
Once authenticated, you will be logged into the server and can start executing commands.
Install the BeAdmin Panel
Want to simplify server management? Install the BeAdmin Panel and manage your server through an easy-to-use interface.
Learn more in the Installation Guide.
To disconnect from the server, type:
exit
Extra: Setup SSH Key Access
To avoid entering a password each time, set up SSH key authentication:
- Generate an SSH key pair on your local machine:
ssh-keygen -t rsa -b 4096
- Copy the public key to the server:
ssh-copy-id username@server_ip_or_hostname
Troubleshooting
- Connection Refused: Ensure the server is online and the SSH service is running.
- Permission Denied: Double-check your username, password, or SSH key setup.
- Network Issues: Verify your internet connection and that the server's IP/port is correct.