PuTTY Commands – List of SSH Commands

List of PuTTY SSH Commands

PuTTY is a free and open SSH client. It provides a secure connection to connect remote server. In PuTTY you need SSH command to handle functionalities. Basic SSH command will help users to manage files more easily. Here we provide a brief guide on SSH command and its usage: –

What are SSH commands?

SSH stands for Secure Shell. It is a network protocol that provides a secure connection to remote server over an unsecured network. It allows you to modify and manage the settings on the remote server. SSH can strongly encrypt the data that is transferred between the host and remote server to prevent unauthorized access.

SSH allows you to execute commands, transfer files, and logging in on a remote server, and perform tasks on remote server. When the SSH connection start, it allows to control the server by entering commands. The SSH is mostly used by Administrators and developers who want a secure connection to manage remote servers.

To use the PuTTY SSH command, there are few a primary requisites to run the command

1.  A Linux Server.

2. PuTTY installed on your computer.

3. IP address of the remote server.

4. User name and password.

Access to Remote Server by using PuTTY 

Open PuTTY. On the right side in the hostname section enter the remote server’s host name or IP address. Set connection type and set port no. click on open and then enter name and password.

An alternative method to access the server by using an SSH terminal. In Windows, there is no built-in terminal. But in Mac and Linux, it has built-in SSH terminal. Open the terminal and run this command

ssh username@IP address

In this command replace the username and IP address of the remote servers you want to connect.

Useful List of SSH Commands for PuTTY

1. cd command

cd : It stands for change directory. By this command, you jump into the selected directory.

For example. cd/home

cd. : From this command, you remain in the same directory.

cd.. : By this command, you come back one step.

For example cd../home/music/play, you will come back to home/music.

cd~ : This command will take to you home directory from anywhere.

cd- : By this command, you go back to the previous location.

2. pwd command

pwd : By this command, it will show your current location.

3. cp command

cp : It stand for copy. This command is used to copy files and folders.

 For example: cp filename.exe/home/file/filename.exe

cp-r : By this command select folder all content copy.

cp-f : This command is used to delete the already present same-name file at destination folder.

cp-n : This command firstly checks the destination folder, if copy file is already present then it will not copy the file.

4. mkdir command

mkdir : It stands for make directory with the name suggestion.

For example: mkdir name

5. ls command

(Note: This is a small L Not i)

ls : It stands for list command. It will display all the files in folder in list format.

For example: ls/home/task

ls-h : It will display all files with their file size.

ls-alh : It will display all other options of files.

6. cat command

cat : This command will show the content of files.

7. mv command

mv : It stands for move file. It will move the file instead of copying it.

For example: mv name.extension/home/task/name.extension

8. rm command

rm : This command is used to delete files.

For example: rm name.php

rmdir : It will delete the complete folder.

rm-r : It will delete the folder with an inside folder.

9. touch command

touch : By this command, you can create new file with any extension.

10. chmod command

chmod : It stands for change mode. It will change the permission of the file.

11. head command

head : This command let you read first 10 lines inside the content.

For example: head filename.txt

12. tar command

tar : This command is used to compress and decompress the folder.

For example: tar -czvf foldername.tar.gz foldername to compress the folder.

tar -xvf foldername.tar.gz to decompress folder.

13. tail command

tail : This command displays the last 10 lines of content.

For example: tail name.txt

14. zip command

zip : This command is used to zip the folder.

For example: zip-r foldername.zip 

15. unzip command

unzip : This command is used to unzip the folder.

For example: unzip filename.zip

16. clear command

clear : This command is used to clear all the text from the terminal.

17. wget command

wget : This command is used to download file from internet.

For example: wget http://fileurl/filename.extension

18. du command

du : It stands for disk usage, Which show the size of file and folder in block no.

For example: du[path]

du -h : It will show the size of disk in bytes. 

For example: du -h/[path]

19. history command

history : it will display the last used command for limited number.

For example: history 10

20 vi command

vi : It is a text editor

vi [filename] : It will open the file on screen if the file is not exist, the editor will create file for you with same name.

21. find command

find : This command find file inside the diectory.

find/[filename] : search the whole directory.

find. : search current directory.

find~ : search home directory.

These are some common SSH command. By using these SSH commands, it will complete your work in less time. SSH command will help to perform the task, manage and modify the function on the remote computer.