How to Connect to a Remote Server Via Ssh From a Linux Shell

How to Connect to a Remote Server via SSH from a Linux Shell
by Janeth Kent Date: 16-02-2017 ssh server linux


Introduction

Secure Shell (SSH) is a UNIX-based command interface and protocol for securely getting access to a remote computer. SSH is actually a suite of three utilities - slogin, ssh, and scp - that are secure versions of the earlier UNIX utilities, rlogin, rsh, and rcp. SSH commands are encrypted and secure in several ways. Both ends of the client/server connection are authenticated using a digital certificate, and passwords are protected by being encrypted.

SSH allows you to connect to your server securely and perform Linux command-line operations.

 

SSH using sudo

 

For high-level tasks coupled with increased security, you can set up a sudo user instead. This user normally functions as a lower-level user, but can perform the same tasks as root when necessary.

For all examples that pertain to the root user, a sudo user can do the exact same thing by adding sudo in front of the rest of the command. You will be prompted for the root password, and then the command will execute.

Example root command:

          top

Same command for a sudo user:

          sudo top

Connect to the server

Open your SSH client.
To initiate a connection, type:

ssh [email protected]

NOTE:

If you are trying to connect as a sub-FTP user, you will want to use the following command context:

ssh subftpuser%[email protected]

Make sure you use your own domain name or IP address. If you want a user other than root, type the other username before the @ symbol.

Type:

ssh [email protected]

OR (IP address version)

ssh [email protected]

OR (domain FTP user version)

ssh [email protected]

Be sure to replace xxx.xxx.xxx.xxx with your server's IP address. Type:

ssh [email protected]

If this is your first time connecting to the server from this computer, you will see the following output. Accept the connection by typing "yes."

The authenticity of host 'example.com (12.33.45.678)' can't be established.
RSA key fingerprint is 3c:6d:5c:99:5d:b5:c6:25:5a:d3:78:8e:d2:f5:7a:01.
Are you sure you want to continue connecting (yes/no)?
yes

You will now be prompted to enter your password. Please note that you will NOT see your cursor moving, or any characters typed (such as ******), when typing your password. This is a standard Terminal security feature. Hit enter.
You can also copy and paste, using Command+V to paste.

Password:

That's it, now you're connected to your Hosting service via SSH.

You are now logged into your Grid via SSH. You should see output like this:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
[email protected]:~$

You are now logged into your server via SSH. You can begin typing commands at the prompt.

The output will look something like this:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
[email protected]:~$

To connect 'to' a certain port when ssh'ing.

 

ssh [email protected] -p XXX

where xxx is the port number

That's all for this short tutorial on how to connect to a remote server via ssh from a linux shell

 
by Janeth Kent Date: 16-02-2017 ssh server linux hits : 3068  
 
Janeth Kent

Janeth Kent

Licenciada en Bellas Artes y programadora por pasión. Cuando tengo un rato retoco fotos, edito vídeos y diseño cosas. El resto del tiempo escribo en MA-NO WEB DESIGN END DEVELOPMENT.

 
 
 

Related Posts

Matrix. An open network for secure and decentralized communication that you can install in your Ubuntu server

Imagine to have an open platform that is as independent, vibrant and evolving as the Web itself, but for communication. As of June 2019, Matrix is out of beta, and the protocol…

How to setup Free Let’s Encrypt SSL certificates with ISPConfig 3

Let’s Encrypt is an initiative to provide a better way of enabling encryption on websites. It is open, automated and above all: it offers free SSL certificates. Obtaining SSL certificates was always…

Configuring DNS-over-TLS and DNS-over-HTTPS with any DNS Server

The new DNS-over-TLS (DoT) and DNS-over-HTTPS (DoH) protocols are available for enabling end user's privacy and security given the fact that most DNS clients use UDP or TCP protocols which…

How to Set up a Fully Functional Mail Server on Ubuntu 16.04 with iRedMail

Setting up your own mail server from scratch on Linux is complex and tedious, until you meet iRedMail. This tutorial is going to show you how you can easily and…

Setting Up SFTP on Ubuntu 16.04

I recently had a request to setup SFTP for a customer so they could manage a set of files in their environment through an FTP GUI. Being an avid user…

The Best Free SSH Tabbed Terminal Clients for Windows

PuTTy is an emulator for the terminal. It allows you to log into another computer that can be on the same network or accessed via the internet. The basic program…

How to setup FTP server on ubuntu 14.04 with VSFTPD

FTP is used to transfer files from one host to another over TCP network. This article explains how to setup FTP server on ubuntu 14.04 . There are 3 popular FTP…

How to Create a .ONION Website and Domain With Tor Network

Not a lot of people know about .onion websites, not many people actually use it. .ONION websites are used by people who want to stay anonymous. In addition, .onion websites…

10 Server and network monitoring tools

When you have a website or a network, it’s helpful to be aware of any issues as soon as they occur. There are open source and freeware server/network monitoring tools…

Install Bit Torrent Sync on Ubuntu

There are some great tools for syncing files over the internet available to us, but one stands out from the rest in regards of technology used and possible use cases. A…

Ubuntu: How To Start Program As Service

According to Ubuntu’s Upstart website, “Upstart is an event-based replacement for the /sbin/init daemon which handles starting of tasks and services during boot, stopping them during shutdown and supervising them…

How to import and export a large database using SSH

The following code snippets will allow you to import and export a database Command Line. To get SSH access to your hosts server you will need to contact your web hosting company,…

We use our own and third-party cookies to improve our services, compile statistical information and analyze your browsing habits. This allows us to personalize the content we offer and to show you advertisements related to your preferences. By clicking "Accept all" you agree to the storage of cookies on your device to improve website navigation, analyse traffic and assist our marketing activities. You can also select "System Cookies Only" to accept only the cookies required for the website to function, or you can select the cookies you wish to activate by clicking on "settings".

Accept All Only sistem cookies Configuration