Set up an ssh connection In Ubuntu (connection method: Bridging network adapter, Network Address Translation (NAT), and using tussh

Source: Internet
Author: User
Tags ssh port vm virtualbox

Set up an ssh connection In Ubuntu (connection method: Bridging network adapter, Network Address Translation (NAT), and using tussh

Operating System: Ubuntu Server 16.04.2

SSH software: Putty (remote connection tool, depending on the local operating system select the corresponding version of putty)

 

-------------------------------- Network connection method: Bridging network adapter -----------------------------------

Step 1:

1) install openssh-server by running the following command:

Sudo apt install openssh-server

Because I have installed openssh-server on my local machine, it is inconsistent with the first installation (please ignore it !)

Tip: If [server] does not install openssh-server, we cannot remotely log on to [server];

Advantages: open-source, free, encrypted throughout the transmission process (Secure remote connection)

 

Run the following command to uninstall openssh-server:

Sudo apt remove -- purge openssh-server

Ubuntu system how to uninstall the deletion software: https://jingyan.baidu.com/article/59a015e39abf3df79588655b.html

The simplest method is that when we know the software name, we can simply enter the command in the terminal command window:

Sudo apt-get remove -- purge google-chrome-unstable

-- Purge indicates that the software modification and related files are permanently deleted.

2) view the IP address. The command is as follows:

Ifconfig or ip

 

Step 2:

1) install putty (my system is 64-bit, so I installed a 64-bit putty)

  

2) Open putty. The connection requires two parameters: IP address and Port.

IP Address: 192.168.1.105 (ifconfig view)

Port: 22 (default ssh port)

If it is an ECS, the port is what they give. If it is not an ECS instance, the port is 22 (default ssh port );

 

-------------------------------- Network connection method: Network Address Translation (NAT )-----------------------------------

Network Connection Mode: Network Address Translation (NAT), that is, the so-called class A address (10. The IP address with the header)

Note that the remote machine cannot directly access the Class A address, and port forwarding settings are required (VMWareThere is no problem with the virtual machine)

ForVM VirtualBoxVirtual Machine Settings.

Host IP Address: IP address of the current operating system. Default Value: localhost (optional)

Subsystem IP Address: Virtual Machine

Forward data from Port 2222 of the external operating system (you can modify the port through sshd_config) to port 22 of the subsystem.

 

Next, it will be the same as the above operation. I will not talk about it here ~

 

------------------------ Problem ------------------------

VirtualBox error )/~~ Failed to solve the problem. I have no choice but to choose the vmwarevm. If you have any solutions, please help me solve it !!!

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.