SSH Login Guide
Prerequisites
Before connecting to SRILS Server, ensure you have:
- SSH client installed on your local machine
- Valid user credentials (username and password or SSH key)
- Network access to the server
Connecting to SRILS Server
There are two ways to access the SRILS servers depending on your network location:
Internal Access (Within Network)
For users within the internal network, you can connect directly to the servers:
# Connect to SRILS-01
ssh user@01.srils.cn
# Connect to SRILS-02
ssh user@02.srils.cn
External Access (From Internet)
For users connecting from outside the network, use the external gateway with specific ports:
# Connect to SRILS-01 (external)
ssh -p 52001 user@ext.srils.cn
# Connect to SRILS-02 (external)
ssh -p 52002 user@ext.srils.cn
SSH Client Installation
Windows
SSH client is built-in on Windows 10 (version 1809+) and Windows 11:
# Open PowerShell or Windows Terminal
# Check SSH version
ssh --version
Recommended Terminals:
- PowerShell (built-in on all Windows versions)
- Windows Terminal (recommended for Windows 11, available from Microsoft Store)
- Command Prompt (basic terminal, works but less features)
If SSH is not available on older Windows versions, you can install it via:
# Install OpenSSH Client (Windows 10 version 1803+)
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
macOS
SSH client is pre-installed:
# Open Terminal
ssh --version
Linux
SSH client is typically pre-installed:
# Ubuntu/Debian
sudo apt update
sudo apt install openssh-client
# CentOS/RHEL
sudo yum install openssh-clients
SSH Configuration File
Create a config file for easier connections:
# Create/edit SSH config file
nano ~/.ssh/config
Add server configurations for SRILS servers:
# SRILS-01 Internal Access
Host srils01
HostName 01.srils.cn
User user
Port 22
ServerAliveInterval 60
ServerAliveCountMax 3
# SRILS-02 Internal Access
Host srils02
HostName 02.srils.cn
User user
Port 22
ServerAliveInterval 60
ServerAliveCountMax 3
# SRILS-01 External Access
Host srils01-ext
HostName ext.srils.cn
User user
Port 52001
ServerAliveInterval 60
ServerAliveCountMax 3
# SRILS-02 External Access
Host srils02-ext
HostName ext.srils.cn
User user
Port 52002
ServerAliveInterval 60
ServerAliveCountMax 3
Now you can connect easily with short commands:
# Internal connections
ssh srils01
ssh srils02
# External connections
ssh srils01-ext
ssh srils02-ext
Troubleshooting SSH Connection
Common Issues and Solutions
Connection Refused
# Check if SSH service is running
sudo systemctl status ssh
# Start SSH service if needed
sudo systemctl start ssh
Permission Denied
# Check SSH key permissions
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub
chmod 700 ~/.ssh
Host Key Verification Failed
# Remove old host key
ssh-keygen -R your-server-ip
# Or edit known_hosts file
nano ~/.ssh/known_hosts
Security Best Practices
- Use SSH Keys: Always prefer key-based authentication over passwords
- Strong Passwords: If using password auth, use strong, unique passwords
- Regular Updates: Keep SSH client and server updated
- Firewall Rules: Ensure only necessary ports are open
- Monitor Access: Regularly check SSH logs for unauthorized attempts