Software & Apps Linux Use the SSH Command in Linux Log in and work on any Linux computer anywhere in the world by Juergen Haas Writer Former Lifewire writer Juergen Haas is a software developer, data scientist, and a fan of the Linux operating system. our editorial process Juergen Haas Updated on January 22, 2020 Linux Switching from Windows Tweet Share Email The Linux ssh command accesses a remote computer using a secure encrypted connection between the two hosts over an insecure network. The command opens a window on your local machine, through which you can run and interact with programs on the remote machine. An ssh Linux session is encrypted and requires authentication. ssh stands for Secure SHell, referring to the operation's inherent security. Usage Examples These examples assume you're using SSH with a remote computer that accepts passwords. Read more about SSH key authentication for a more secure method of using SSH that does not require passwords. To log in to a computer with a specified network id (comp.org.net) and a specified username (jdoe), use the following command: ssh firstname.lastname@example.org If the username of the remote machine is the same as on the local machine, omit the username in the command: ssh comp.org.net If it's your first login attempt on that machine, you'll encounter a one-time fingerprint alert: The authenticity of host 'sample.ssh.com' cannot be established. DSA key fingerprint is 04:48:30:31:b0:f3:5a:9b:01:9d:b3:a7:38:e2:b1:0c. Are you sure you want to continue connecting (yes/no)? Enter yes to tell the machine to add the remote computer to your list of known hosts, ~/.ssh/known_hosts. You'll see a message such as this: Warning: Permanently added 'sample.ssh.com' (DSA) to the list of known hosts. Once you're connected, you're prompted for a password. After you enter it, you'll see the shell prompt for the remote machine. You also can use an ssh command to run a command on a remote machine without logging in. For example: ssh email@example.com ps executes the ps command on the computer called comp.org.net and shows the results in your local window. Why Use SSH? SSH is more secure than other methods of establishing a connection with a remote computer because you send your login credentials and password only after a secure channel has been established. Also, SSH supports public-key cryptography.