Trusted answers to developer questions

SSH -l

Get Started With Data Science

Learn the fundamentals of Data Science with this free course. Future-proof your career by adding Data Science skills to your toolkit — or prepare to land a job in AI, Machine Learning, or Data Analysis.

SSH, also known as Secure Shell or Secure Socket Shell, is a network protocol that gives users, particularly system administrators, a secure way to access a computer over an unsecured network.

svg viewer

Syntax

The syntax for ssh is:

ssh OPTIONS USERNAME@HOSTNAME
  • OPTIONS(optional): used to specify various command options that can allow authentication, compression, etc.
  • USERNAME(optional): used to specify the username we want to use at the time of connection to the host.
  • HOSTNAME: is the IP address or hostname of the site that we want to connect to.

Using ssh -l

The -l option is used to specify our username and the hostname that we are connecting to. It specifies the user to log in as on the remote machine.

For example, to log in as a user with the username ​root, the command would be:

ssh -l root myexamplewebsite.com

The above command is an alternative to:

ssh root@myexamplewebsite.com

RELATED TAGS

ssh
socket
shell
port
forwarding
Copyright ©2024 Educative, Inc. All rights reserved
Did you find this helpful?