SSH

What is SSH?

SSH == Secure Shell

It enables you to type in commands and access remote computers with full control.

How to use SSH?

If your computer is B, and you want to control one remote computer A.
We call A server, and B client. We need specific software for them.

Server

Linux (Ubuntu/CentOS/...)

Under Linux OS, you will need OpenSSH as server.
First, you need to install this server using:

sudo apt-get install openssh-server

Then start the service:

sudo service ssh restart

Windows

It is also possible to access Windows PC using SSH.
Please refer to: Windows_OpenSSH

Client

Linux (Ubuntu/CentOS/...)

Linux has build-in SSH client. You can just open Terminal (Ctrl+Alt+T) and type in ssh.

Windows

  • Xshell: free for personal usage. Download
  • PuTTY: Download
  • The PC in the office is already with SSH installed.

Basic Usage

Assume that you want to access computer A, it's IP is 192.168.50.1. And you have an account on A, username: admin and password: 123

Build Connection

Type in the commands in your client:

ssh admin@A
ssh [email protected]

Then you can type in commands directly on the remote PC.

Change SSH Port Number

The default port of SSH service is 22, if the server use other ports, such as 233

ssh -p 2222 user@host

X11 Forwarding

We can also make use of X11 forwarding to open softwares, e.g. Matlab, with GUI. Some servers (...) already enabled the X11 forwarding. To use it, just type:

ssh -X user@host

results matching ""

    No results matching ""