What is SSH?
SSH, or Secure Shell, is a network protocol that provides a secure way to access and manage a remote computer or server over an unsecured network, such as the internet. It uses encryption techniques to ensure that all data transmitted between the local and remote machines is secure and private.
The main purpose of SSH is to establish a secure and encrypted communication channel between two devices, allowing a user to remotely access and control a device as if they were physically present at the device. SSH can be used for a wide range of purposes, including remote command-line access, file transfer, and tunneling network traffic.
SSH operates on two main components: the client and the server. The client is the software application used to initiate the secure connection, while the server is the software running on the remote machine that accepts incoming connection requests.
To use SSH, you need to have an SSH client installed on your local machine, and an SSH server running on the remote machine. The client and server communicate through a series of encryption and authentication protocols to establish a secure connection.
SSH is widely used by system administrators, developers, and other technical users to securely access and manage remote servers and devices. It is also used by individuals who want to encrypt and secure their internet traffic when accessing public Wi-Fi networks or other unsecured networks.
To learn more about SSH and its history check out our article What Is SSH?
Mac users can use a free application called Terminal that comes included as part of MacOS to make SSH connections to remote servers and computers.
How To Locate and Open Terminal on Your Mac
Here is where to find the Terminal app on your Mac:
- Click on Launchpad in your Dock
- Look for Other (apps)
3. Terminal is located under Other --> click on Terminal. You can also drag the icon from the Launchpad to your Dock for quick reference if you use the app often.
Launch Terminal and Welcome Screen
When you initially launch Terminal, you will be greeted with the following screen (we have hidden the sensitive information in this screenshot):
Basic SSH Commands
Lets discuss some basic commands to use when connecting to a remote server.
The SSH Command
Typing the ssh command in Terminal will show you a list of basic ssh commands and syntax to get you started. Type the following in the command line:
Connect to Remote Server
Keep in mind we are going to be using placeholders here. You should fill in your actual SSH username and domain/IP address to connect to the server or remote machine of your choice.
The standard syntax for connecting to a remote machine is:
Here are two examples:
You can use either of the above two examples to connect to a remote machine. If this is the first time you are connecting to the remote machine, you will be asked to accept the connection, in which case you will want to type yes.
Once you accept the connection, you will be asked for your password. When you type your password, you will not see your cursor moving or even any characters appear on the screen. This is standard security functionality for Terminal.
You will now be logged into the server.
Terminal Options and Customization
The Terminal app allows for quite a bit of customization to suit your particular preferences in terms of look and feel.
- In the upper left-hand corner, click on Terminal --> Settings...
2. When the popup menu appears, click on the second tab Profiles and you will be presented with a list of profile options to customize the UI of Terminal.
3. You can go through the list of Profiles to find one that suits your taste and preferences. You an also create your own custom profile and save it as your Default profile. As you can see, there are tabs to customize every part of the user interface of Terminal so feel free to play around because you can always revert back to the Basic profile if you end up not liking the one you created.
4. Once you decide on one you would like to use, click it and choose the Default button at the bottom of the list. You will not see and immediate change. You will have to open a new Terminal window to see your changes take effect.
5. Here we have chosen the Ocean Profile and have launched a new window to see the updated look and feel.
Adding Terminal to the Dock
If you are going to be using Terminal often, you can add it to the Dock for easy access.
- From the Dock, click on Launchpad
- Click on Other
- Click on Terminal and drag it to the Dock to add it to your list of easy to access apps.
Now that you are familiar with Terminal and its basic functions, there are many commands you can execute to control the remote machine from your Mac. Check out future resources coming from AskAboutStuff.com.