Managing Remote Server Securely Using SSH
Eleke Great
Top Voice || Senior Python Developer @ SkillSeeds|| Author of Saturday with Codes || Join thousands of Software Engineers to Subscribe to Saturday with Codes Newsletter ?
SSH (Secure Shell):
How to manage remote server securely using SSH.
1. Ensure SSH is Installed:
2. Generate SSH Key Pair:
ssh-keygen -t rsa -b 4096
Follow the prompts to generate the key. This will create a public key (id_rsa.pub) and a private key (id_rsa).
3. Copy the Public Key to the Server:
ssh-copy-id your_username@your_server_ip
This command will prompt you for your password on the remote server and then copy your public key to the ~/.ssh/authorized_keys file.
4. SSH Configuration:
Host myserver
HostName your_server_ip
User your_username
IdentityFile ~/.ssh/id_rsa
5. Connect to the Server:
领英推荐
ssh your_username@your_server_ip
ssh myserver
6. Secure the SSH Configuration:
7. Firewall Configuration:
sudo ufw allow 22
sudo ufw enable
8. Regularly Update and Patch:
9. Monitor and Audit Logs:
10. Optional: Use Two-Factor Authentication (2FA):
By following the above listed steps you will be able to manage your remote servers securely.
Like and subscribe to Saturday with codes, and become a profitable developer in 2024.
More sponsors needed.
| HR & Marketing Leader | Founder | I help aspiring entrepreneurs build their brands | 397K+ | Helped 580+ brands on LinkedIn | Organic LinkedIn Growth | Author |920M+ content views | Lead Gen | Influencer Marketing
1 年Thanks for sharing this information
Product Leader | Sr. Product Manager at Bajaj Finserv | IIM Kozhikode Alum | Platform Integrations & Customer-Centric Solutions | 12+ Years in Product & Marketing Excellence
1 年Thanks for sharing
Manager at Food Corporation of India
1 年Informative share
?? Aspiring Data Scientist | ?? BSc in Data Science and Programming Candidate at IIT Madras | ?? Data Enthusiast | ?? Seeking Opportunities
1 年Love this