Saturday, July 6, 2024

Top 10 OpenSSH Commands Every Administrator Should Know

 

Top 10 OpenSSH Commands Every Administrator Should Know

OpenSSH commands are essential for system administrators to manage servers efficiently and securely. Here are the top 10 OpenSSH commands every administrator should know.

1. ssh

The ssh command is used to connect to a remote host.

bash: ssh user@hostname
 

2. scp

scp (secure copy) is used to transfer files between hosts.

bash: scp file.txt user@remote:/path/to/destination

 

3. sftp

sftp (Secure File Transfer Protocol) allows you to transfer files securely.

bash: sftp user@hostname

 

4. ssh-keygen

ssh-keygen is used to generate SSH key pairs for secure authentication.

bash:  ssh-keygen -t rsa -b 4096
 

5. ssh-copy-id

ssh-copy-id copies your public key to a remote host for key-based authentication.

bash: ssh-copy-id user@hostname

 

6. sshd

sshd is the OpenSSH server daemon that listens for incoming SSH connections.

bash: sudo service sshd start

 

7. ssh-agent

ssh-agent is used to hold private keys used for public key authentication.

bash: eval $(ssh-agent -s)

 

8. ssh-add

ssh-add adds private key identities to the authentication agent.

bash: ssh-add ~/.ssh/id_rsa

 

9. ssh-config

ssh-config allows you to customize your SSH client configuration.

bash: vim ~/.ssh/config
 

10. sshfs

sshfs is used to mount remote filesystems over SSH.

bash: sshfs user@hostname:/remote/path /local/mount/point

 



These commands are fundamental tools for any system administrator, 
providing essential functionality for secure and efficient server management.

 

 

No comments:

Post a Comment

Please keep your comments relevant.
Comments with external links and adult words will be filtered.