Web development and Tech news Blog site. WEBISFREE.com

HOME > linux

How to connect to ssh using Linux commands

Last Modified : 04 Mar, 2023 / Created : 05 Mar, 2023
676
View Count

Many people use programs like Putty to connect to machines such as servers. Another way to connect is by using the SSH command available on Linux. Below is how to connect to a different computer or machine using OpenSSH. Let's explore more in detail below.




# Discovering Linux SSH Commands


By using SSH, you can securely connect between hosts. You can perform tasks such as changing or copying files. So, what is the simple method of use?

ssh <host URL> <Options>


The simple grammar is as follows. If you want to access webisfree.com, you can give the command as shown below.
ssh webisfree.com

Very simple, right? Here are additional usage instructions below.

First, here is how to add user ID. It is used in the form of @ in front of the address. For example, for Ubuntu user, enter as shown below.
ssh ubuntu@webisfree.com

If you enter the username, you only need to enter the remaining password.


! Discover commonly used options.

So what are the available options? Let's start by looking at the frequently used options.


-p // Setting port up
Set the port to be used. If you are using port 22, enter it as follows.
ssh myId@0.0.0.0 -p 22


-i // Using a key file
If there's a key file required for authentication, use it as follows.
ssh -i keyfile user@ip

The above two are the most commonly used. Below are other options.

  • -V // Print version information.
  • -C // Compressing transmitted data.
  • -4 // IPv4 Use of address
  • -6 // IPv6 Use of address
  • -1 // Using protocol version 1
  • -2 // Using protocol version 2

We looked into SSH information up to this point.

Using SSH is a great way, but programs like Putty for SSH connections are also widely used. Above all, it has the advantage of being able to easily save and connect access and authentication information.

Perhaps you're looking for the following text as well?

    Previous

    Understanding the Linux Command uptime

    Previous

    Learn about the Linux command rename