What are Commonly Used SSH Commands? Print

  • 1

What is SSH?

SSH stands for Secure Shell. It is a tool for communicating with a server remotely. The Secure Shell (SSH) protocol is a method to securely send commands to a computer over an unsecured network like the Internet. You can access the server that allows you to make the required modifications.

SSH deploys cryptography to authenticate and encrypt connections between devices. It makes use of text commands that execute all the actions. It is similar to a command-line interpreter like the Command Prompt available in most Windows distributions.

Functions of SSH

SSH can perform many functions. Here are a few of them:

  • Manage, control, and modify systems and applications remotely.
  • Run commands to manage files, folders, and databases.
  • Create secure tunnels for other application protocols and run sessions remotely.

Basic SSH Commands

SSH has several commands that help you access, manage, and make necessary changes to the server. Here are the 25 most important commands to help you execute actions:

  1. ls - Shows directory contents (lists the names of files).
  2. man - Stands for manual. This command is always used in addition to another command, like cd. It displays all the additional options available with that command with a complete description.
  3. cd - Changes the directory.
  4. chown - Changes user and group ownership.
  5. chmod - Changes permissions (read, write, and execute) for the owner, group, and other users accessing that file/directory.
  6. mkdir - Creates a new folder or directory.
  7. touch - Creates a new file.
  8. cat - Shows the contents of a file.
  9. rm - Removes a file easily.
  10. pwd - Shows the full path of the current directory.
  11. top - Gives a periodic update of running Linux tasks.
  12. ps - Shows a snapshot of all currently processing tasks.
  13. du - Gets file size.
  14. wget - Downloads files from the internet.
  15. tar - Creates and unpacks compressed archives.
  16. df -h - Gives current overall disk usage in gigabytes.
  17. du -hs - Calculates the total directory size in a human-readable format.
  18. clear - Clears the terminal screen.
  19. vi/nano - Text editors; nano is easier for beginners, while vi is for experienced users.
  20. history - Shows the last 50 used commands.
  21. cp - Copies a file/folder.
  22. mv - Moves a file/folder.
  23. grep - Searches for a specific phrase in a file/line.
  24. find/locate - Searches files and directories in an indexed database.
  25. locate -u - Periodically updates the database files for a faster and more comprehensive file search.

In a Nutshell

SSH is a useful method for making a secure connection between the server and the client. With its end-to-end encryption, you can access your server remotely and securely. The above commands are crucial to learning as they help you manage your server easily.


Was this answer helpful?

« Back