How to Use SSH on Mac

In this tutorial, we will guide you on how to use SSH on Mac.
Secure Shell basically helps you to access and move data from one device to another using a network protocol. It basically provides you with a secure channel.



Step 1 – Use the ssh command
Secure shell in Mac OSX in particular is installed by default. All you have to do is go to the utilities window and open up the terminal application in order to use it.
Once you are there, type in the following command:
ssh YOUR USERNAME@YOUR SERVER ADDRESS
Once you hit enter, you will be prompted for the password. Upon typing in the correct password, you will be able to access the other system, which means a successful connection has been established.
Access the server


Step 2 – Use the ls command
Since we are connected to a Linux based environment, let’s use the “LS” command to list the contents of the SSH server.
Enter the ls command

Step 3 – Create a new directory
If you want to create a new directory in the SSH server, simply type the “MKDIR” command followed by the name of the directory you want to create.
List the contents of the SSH server on Mac and you will notice the newly created directory is there.
Create directory in SSH server

Step 4 – Change directory
If you want to access a directory, you can use the “CD” command followed by the name of the directory. For the purpose of this tutorial, we will access the newly created directory with the help of the cd command.
Use the cd command

Step 5 – Go back to the root
Now go back to the main directory by simply typing the “CD” command followed by a back slash.
Go back to the main directory command

Step 6 – Use the RMDIR command
To delete a particular directory on the server, simply use the “RMDIR” command followed by the name of the directory.
For the purpose of this tutorial, we will delete the folder that we just created.
Now when we list the contents on the server, you will see that the folder has been removed from the SSH server on Mac.
Remove a directory from the SSH server

Step 7 – Logout
Finally, you can close the session by typing logout and hitting enter. Over there, you will notice that the connection has been closed successfully.
In this manner, you can use SSH on Mac to navigate through the SSH server.
Close the session