Hey Namaste,

In this article, We will learn some of the SSH commands for server operations like zip, unzip, delete and move a file from one server to another.

SSH is the best solutions to do a server-side operation in speed. So Let’s start.

SSH in simple language

Stands for “Secure Shell or Secure Socket Shell.” SSH is a method of securely communicating with another computer. The “secure” part of the name means that all data sent via an SSH connection is encrypted. This means if a third party tries to intercept the information being transferred, it would appear scrambled and unreadable. The “shell” part of the name means SSH is based on a Unix shell, which is a program that interprets commands entered by a user.

Source: www.techterms.com

 

Install PuTTY

PuTTY is a free and open-source terminal emulator, serial console and network file transfer application.
Using PuTTY We can do SSH operation with a remote server

Download from: www.putty.org

SSH Commands

1. ZIP(Compress) Operations
1.1 Compress(zip) all files in the current directory
e.g zip filename.zip *

Note: In this, subfolders and files will note includes and you can add file name without extension.

1.2 Compress(zip)an entire directory including all sub-directories
e.g zip -r filename *

2. UNZIP Operations
Unzip specific file
e.g unzip filename.zip

3. Delete folder or file
e.g rm -rf folder-name/

4. Move files from one server to another
For this, we will use SCP command and need both Servers IP Address, Username, Password and path to file or folder

Move file from the old server (A) to a new server (B) while logged into A

e.g scp path/to/file UsernameofB@IPofB:path/to/destination

Note:
public_html/filename.zip = Server A
yuvrajkhavad@192.111.1.1:public_html/newdata = Server B

Contributing
Pull requests are welcome. Please add your ssh command submit a pull here
Please make sure to update tests as appropriate.

Have other commands in mind then please mention on the comment I will add it on a post.

Note: This post originally posted at https://zindex.co.in/play-with-ssh-secure-shell/