Enterprise SONiC Bootcamp Register Now

Sign Up

Secure Shell (SSH) Guide

Discover essential SSH tips to optimize your remote access and management. Perfect for enhancing security and efficiency, these tips are valuable for both new users and experienced admins. Start improving your SSH skills today!

Secure Shell (SSH) Guide

This cheat sheet offers a comprehensive collection of essential SSH commands for efficiently managing remote servers, securely transferring files, and setting up connections. It includes quick commands for connecting to servers, copying files between local and remote systems, and setting up port forwarding for secure access. Additionally, it covers key management for password-less authentication, along with advanced Docker and Kubernetes commands for managing containers and clusters. Perfect for system administrators, developers, and DevOps professionals who need a quick reference to streamline their workflow and enhance productivity.

Basic SSH Commands

File Transfer with SCP

Connect to a Remote Server
Connect to a Specific Port
Use an Identity File
Run Command on Remote Server
Enable Agent Forwarding

Copy Local to Remote
Copy Remote to Local
Copy Directory

SSH Tunneling

SCP (Secure Copy) Advanced

Local Port Forwarding

Remote Port Forwarding
Dynamic Port Forwarding

Limit Bandwidth during Copy
Preserve File Permissions/Attributes
Use Compression during Transfer

Network Commands

Miscellaneous Useful Commands

Ping a Host
Trace Route
Check Open Ports
Show Network Interfaces
Test Connectivity to a Specific Port

Check Disk Usage
Check Memory Usage
Show Running Processes
Kill a Process by PID
List Open Files
Reboot a System
Shutdown a System

Kubernetes Additional Commands

Docker Additional Commands

Get All Resources in Namespace

Scale Deployment
Delete All Pods in Namespace
Get Cluster Information
Apply a YAML Configuration
Get Node Information
Drain a Node
Uncordon a Node
Get Pod’s YAML Configuration

Patch a Resource

Build an Image from Dockerfile
List Docker Containers
Stop a Running Container
Remove a Docker Container
Remove a Docker Image
Remove All Stopped Containers
Remove All Unused Images

What is Secure Shell (SSH)?

SSH (Secure Shell) is a protocol used to securely access and manage remote computers over an unsecured network. It enables users to log into a remote system, execute commands, and transfer files with robust security. SSH encrypts the data exchanged between the client and server, ensuring confidentiality and integrity while preventing unauthorized access. This makes SSH ideal for system administration, remote management, and secure data transfers. By protecting communications with encryption and offering authentication methods, SSH simplifies remote interactions and safeguards sensitive information across various environments.

SSH Tips

SSH (Secure Shell) is used for secure remote access to systems. Enhance your SSH experience with these tips:

  1. Use SSH Key Authentication: Secure and simplify access with SSH keys.
  2. Disable Password Authentication: Improve security by turning off password-based logins.
  3. Use Strong Passphrases: Protect your SSH keys with strong passphrases.
  4. Set Up SSH Agent Forwarding: Use local keys on remote servers for convenience.
  5. Use SSH Configurations: Simplify connections with a configuration file.
  6. Limit Access with Allow/Deny: Control who can connect to your server.
  7. Use Port Forwarding Wisely: Securely access services behind firewalls.
  8. Monitor SSH Access: Check logs for unauthorized attempts.
  9. Keep Software Updated: Ensure both SSH client and server are current.
  10. Use Multi-Factor Authentication: Add an extra layer of security.
  11. Avoid Root Access: Use regular accounts with sudo privileges.
  12. Use Verbose Mode for Troubleshooting: Get detailed connection info.
  13. Clean Known Hosts File: Remove outdated host keys.
  14. Manage Keys with Tools: Use ssh-agent to handle keys efficiently.
  15. Configure Idle Timeout: Automatically disconnect idle sessions.

These tips help ensure a secure, efficient, and manageable SSH setup.

GNS3 Knowledge Base

Discover a wealth of information and expert tips in our GNS3 Knowledge Base, your go-to resource for mastering network simulations. Whether you need detailed tutorials, expert tips, or troubleshooting advice, our Knowledge Base has everything to enhance your skills and solve any challenges. Dive in now to enhance your skills and troubleshoot any challenges with ease!

Share the Knowledge: Spread the Word About Our SSH Cheat Sheet!

If you find this page helpful for your networking knowledge and skills, please consider sharing it with your friends, colleagues, and social media followers. Your support helps us create more valuable resources and enhance our courses.

You can share this page on your social media accounts like Facebook, LinkedIn, Twitter, and any related networking and programming forums or blogs. By sharing, you assist other networking enthusiasts in their learning journey, making their work easier and more efficient. So, if you’d like to help others, kindly share this page.

For more in-depth networking knowledge, visit our route2open courses.

Secure Shell (SSH) Cheat Sheet!

Simply provide us with your name and email address, and we’ll send you our cheat sheet straight to your inbox