15 Basic SSH Commands You Should Be Familiar With:

SSH Commands: Secure socket shell or secure shell is a network protocol. It provides a secure way of accessing a computer over an untrusted or unsecured network. It provides public-key authentication, strong password authentication, and communication between 2 computers.

Besides providing strong encryption, network administrators use SSH for managing applications and systems remotely. This enables them to sign in to the other computers, execute commands, and forward files.

How SSH Commands works?

The secure shell was designed for replacing Rlogin, Telnet, and other insecure terminal emulation. Furthermore, SSH is also used for replacing file transfer programs. For example – remote copy (RCP) and file transfer protocol (FTP).

This client-server-based protocol enables a client to connect to the server. However, for issuing SSH commands, firstly you have to complete the authentication process.

The secure shell consists of 3 layers. Namely – transport, authentication, and connection layer. Here is a detailed description of all three layers.

  • The transport layer –It ensures secure and safe communication between a server and a client. It oversees integrity protection, decryption and data encryption. Moreover, provides caching and data compression to ensure fast data exchange.
  • The authentication layer – It conducts the user authentication process and communicates its methods to the user.
  • The connection layer – It manages the communication between the different machines after authentication. The connection layer handles the closing and opening of different communication channels. In addition to it, it allows numerous channels for numerous sessions.

Uses of secure shell

SSH connections are used for securing various types of communication between a remote host and a local machine. It includes – remote execution of commands, secured remote access to the resources, delivery of software patches, and various other administrative management and administrative tasks.

The uses of SSH are not limited to creating a trusted channel between remote and local computers. It is also used for server hardware, managing routers, and file transfer applications.

SSH keys are employed for automating access to the servers. They are used in configuration management, scripts, and backup systems. A user can use SSH with an ordinary password and ID. Some important uses of SSH are – it ensures remote connections, manages a trusted file transfer protocol, tunneling for data transfer, and network management.

Capabilities of SSH

SSH is used in various software and scripts for enabling systems and programs to securely and remotely access data and other information. It includes the following functions –

  • Secure file transfer session
  • Automated file transfer
  • Safe remoteaccess to SSH-enabled devices and network systems.
  • Secure delivery of commands on systems and remote devices.
  • Control of network infrastructure components.

History of SSH

Its first version was designed by Tatu Ylonen in 1995. During that time, he was a researcher and later started SSH communication security. Over time, various issues have been found in SSH 1, and the version is considered unsafe.

SSH-2 was adopted in 2006 by the IETF (internet engineering task force) as a standards-track specification. It uses a stronger integrity check and Diffie-Hellman key exchange for improving security. Various encryption methods such as – Blowfish and Advanced Encryption Standard, can be used by the SSH servers and clients.

The Basic SSH Commands and their Description:

SSH CommandsDescription
catprint the content to the screen
cd-change directory
cd..go up
cpcopy a file
dushow disk usage
file*print a list of all the directories/files in the directory.
killterminate a system process
lastshow the names and timings of who logged in
last-20displays the last 20 logins
Increate a link between directories and files
netstatshows current network connections
picofriendly file editor
ps auxshows system processes
rmdelete a fil
rm-rf tmp/deletes the directory and all files and subdirectories in it

Is it possible to put SSH commands together?

Yes, it is possible. A majority of times you wish to use different commands on a specific line. Here, are some examples for achieving your goal.

|character is known as a pipe. It takes a date from any program and pipes it to the other. Similarly, > means the creation of a new file, >> refers to append data to a file and < means to send input into a command.

After logging in to your VPS server by putty, numerous SSH Commands are available for monitoring and managing its resources. Have a glance at the 4 of them.

  • Create a new file

Touch command will enable you to create a new file. The timestamp of the file will be updated by the command if it already exists.

  • Edit a file

For making required changes to the file, use the nano command for launching a text editor. For removing one or multiple files on the server use the rm command.

rm filenamefor removing a file
rm-r directory name/remove files of the directory from the server
  • Create a new directory

Create a directory with the mkdir command.

mkdir assignmentcreate a directory known as the assignment
mkdir-p assignmentcreate a directory name assignment even if it already exists.
  • Modify the working directory

Use the cd command for navigating the filesystem of your server.

cd/path/to/your/directory/The current directory can be changed to the nominated path.
cd~navigate to the home directory
cd..navigate to the parent of the current directory

Final thoughts

SSH stands as the remote administration protocol for modifying and controlling your remote servers. For secure transferring of information, SSH uses 3 types of encryptions – symmetrical, asymmetrical, and hashing.

A majority of people think that SSH commands are complex. However, they are easy to use and understand. Above we discussed its uses and importance in detail to understand the security aspects of SSH.

As you know, learning SSH commands is important for managing VPS. So, we have also discussed the description of 15 basic commands that are important for a webmaster.

Similar Posts