• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How to Use SSH to Connect Remote Linux Server

Written by Rahul, Updated on February 17, 2017

What is SSH ?

SSH (Secure Shell) is a protocol used for login remote system. It provides higher security on a connection. SSH is most popular protocol to connect remote Linux and Unix servers these days.

To make a connection to the remote server, SSH server must be running on the remote server and you must have some SSH client on your system. Default SSH runs on port 22.

How to Use SSH ?

For example, your remote Linux server (remote.example.com) is running SSH server and open access to your network. Now run following command to from your Linux desktop terminal. After successful authentication, You will get remote server shell.

$ ssh remote.example.com

Windows client users can use following ssh clients.

With the SSH command, you can also specify the remote username. This will login to the remote server with specified user and with their privileges.

$ ssh [email protected]

If your SSH server is running on a non-standard port. You can also specify it during ssh to a remote server with -p option. For example, remote ssh server is listening on port 2222.

$ ssh -p 2222 [email protected]

If your remote server has provided an SSH key. For example, you have a mykey.pem file. You can specify ssh key with -i option with ssh command. Make sure that only current user has access to the key file. Like you can set permission to 400 or 600.

$ ssh -i mykey.pem  [email protected]

What is Key-Based SSH?

Key-based ssh allows you to login to the remote system with ssh without password. You need to simply type ssh remote.example.com and you will get the remote server shell. This is helpful for task automation with ssh. You can also be useful for your frequent login servers.

Using key-based ssh, You can provide enabled security on your ssh server. You can simply disable password based login. Now the remote server will only allow access with key-based.

  • Read: How to Setup Key-based SSH

It may be you have many remote servers and have difficulty to manage SSH hosts and keys. Below tutorial will help you to manage these keys.

  • Read: How to Manage SSH Hosts and Private Keys

Share it!
Share on Facebook
Share on Twitter
Share on LinkedIn
Share on Reddit
Share on Tumblr
Share on Whatsapp
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

1 Comment

  1. Avatar Anudeep Reply
    November 27, 2017 at 12:24 am

    Hello Rahul,

    I installed Linux Machine on Vm. I want access ports in Linux machine from my host computer using NAT network. Can you let me know .

Leave a Reply Cancel reply

Popular Posts

  • How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31 0
  • How To Install VNC Server on Ubuntu 20.04 1
  • How To Install NVM on macOS with Homebrew 0
  • (Solved) apt-add-repository command not found – Ubuntu & Debian 0
  • How to Install .NET Core on Debian 10 0
© 2013-2020 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy