SSH Commands- A Beginners guide [With Examples]
If you’re here that means you’re a web developer. If you’re a web developer, you might have worked on uploading files to the server using FTP Client softwares or CPanel Filemanager. Have you ever used SSH client like putty to dive deeper in the server
What is SSH?
SSH stands for Secure Shell
A Protocol for remote login to server securely through command line or Terminal.
SSH Connection on windows
We have to install a program called SSH Client to access the server via SSH.
Putty is one of the most popular SSH Client for windows. Download and install Putty to access a server over SSH.
How to make an SSH connections?
After installing Putty, you can use your terminal or built-in command-line in putty. To connect to your server via SSH you need 3 things-
- IP Address of server
- FTP Credentials
- Port (Provided by hosting Provider)
To make your first SSH Connection type in the command line –
Then it will ask for password, enter the password and you’ll see the welcome message.
How SSH actually works?
There are certain commands for ssh to perform certain actions like creating a directory or removing one etc.
Some basic SSH commands are listed below –
ls [directory] #To view the contents of a directory rm [directory] #to remove a directory cd [directory] #to enter another directory mkdir [directory] #to make a new directory touch [filename] #to create a file in the new directory. . . The list goes on.
ls Command – To show the contents of a directory
Some additional options to use with ls command-
-a display the hidden files and filenames starting with dot.
-l display additional details of files like file size, permissions and date modified.
-s Shows the filesize in blocks.
cd Command – To change current directory
Touch Command to make new file
mv Command – To Move a file to new location
mkdir Command – To Make a new Directory
Wget Command – To download a file from internet
How to enable ssh as an additional feature in windows 10
In the settings app, go to Manage Additional Features.
Click the Add a Feature button. From the list of available options, select OpenSSH server and click install.
See Also –
CMD Commands for Windows Users
Do You Know How to Configure .htaccess file ?