The ssh command allows you to log in to a remote machine as well as execute commands on a remote machine. When performed as the root user, this method of connecting to the server provides the greatest level of access and control over the server. The root user will have no restrictions regarding file and directory access and is capable of running any command available.
We recommend using OpenSSH, the premier open-source connectivity tool for remote login with the ssh protocol. OpenSSH encrypts all traffic to eliminate eavesdropping, connection hijacking, and other attacks. In addition, OpenSSH provides a large suite of secure tunneling capabilities, several authentication methods, and sophisticated configuration options.
As the administrator of a Linux VPS or Dedicated Server, you will undoubtedly find a number of situations that require accessing the server over ssh and performing commands through the terminal. For a step-by-step guide on accessing the server over ssh, view our Knowledgebase article, How to SSH Your Virtual or Dedicated Server (Linux). In this blog, we have compiled a short list of ssh commands, which are most commonly used in managing a virtual or dedicated Linux server.
cd: change directory
The cd command is used to navigate to a specified directory.
# cd /var
Moves the user to the /var directory.
pwd: print working directory
The pwd command is used to provide the full pathname of the current directory.
Prints full pathname of the current directory.
yum: yellowdog updater modified
The yum command is an interactive, automated update program which can be used for maintaining systems using rpm.
# yum update <package name>
Updates the package “package name”.
nano: GNU nano text editor
The nano command opens a specified file with the GNU nano text editor.
# nano /path/to/file.txt
Opens file.txt with command line text editor.
mkdir: make directory
The mkdir command creates a new directory.
# mkdir <folder name>
Creates new directory, “folder name”.
The rm command is used to delete files and directories.
# rm photo.jpg
Deletes the photo.jpg file.
The mv command moves and/or renames files.
# mv file.png folder/file2.png
Moves file.png to the folder directory and renames it “file2.png”.
wget: GNU wget
The wget command retrieves content from web servers. It is commonly used to download files from public repositories.
# wget https://github.com/Rad-Web-Hosting/RadWebHosting/archive/v2.1.0.tar.gz
These are just a few of the more common commands performed over SSH for Linux server management. You can find more in-depth server management tips in our Knowledgebase Documentation and active clients can always get support from our Support Technicians by opening a ticket in the Hosting Dashboard.