Play With SSH (Secure Shell)

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

Secure Shell

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

Secure Shell

SSH Commands

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

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 *
Secure Shell 3

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

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

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
Putty

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

author-image

Yuvraj Khavad

Co-Founder, Programmer

I’m Yuvraj Khavad, I work at Z Index Solutions where I am the Co-founder!. I’m also like to read books and draw a painting. I have more than 5 years of experience in web development and web design.

Similar Posts

Most useful WordPress Functions
16/09/2020
Most useful WordPress Functions

Hello Namaste 🙏, In this blog post, we will learn the most useful WordPress functions, those functions are very important for custom theme development. About WordPress WordPress is one of […]

Read more
Add WordPress user using FTP
06/02/2020
Add WordPress user using FTP

Recently, one of our client sent us a list of WordPress website changes with FTP detail but they don’t have a WordPress admin login details. At that time below code helps […]

Read more