How to setting an ssh connection on a Virtualbox Ubuntu

How to setting an ssh connection on a Virtualbox Ubuntu

How To setting SSH connection to Ubuntu on Virtualbox. How to setting an ssh connection on a Virtualbox Ubuntu.

Create an Ubuntu Virtualbox

Create a new Virtual Machine and check Create a new virtual disk

Name your virtualmachine, select Linux as OS type and Ubuntu (64 bit) as linux version.

Set the virtual RAM at half of the your real RAM, in my case I have 8gb on my laptop, so i give to virtual machine 4gb

Create a new virtual disk:

Select the source for install your Ubuntu OS, select VDI (VirtualBox Disk Image)

Select Dynamic allocation:

Set the size of your virtual Hard Disk and click on create:

Start your Machine:

Select the iso image of ubuntu (You must download it from ubuntu official web site).

Install Ubuntu following the installation wizard:

After have installed Ubuntu, login your virtualmachine ubuntu with username and password inserted during the installation:

Install openssh-server

sudo apt-get update
sudo apt-get install openssh-server

stop your virtualmachine.

Set the net of your virtualmachine:

click on settings & net:

Select NAT as connection and click on advanced, and set as in the picture below.

Click on port forwarding:

and set the SSH parameter:

Name: SSH

Protocol: TCP

Host IP: 127.0.0.1

Host Port: 2222

IP Guest: Empty

Port Guest: 22

Start your Virtual Machine:

When your VM is started, open your terminal and try to connect:

ssh [email protected] -p 2222

now you shoud be inside your virtualmachine.

Problems and Possible Solutions:

If you can’t connect try to disable or change settings to ubuntu firewall:

sudo ufw disable

or try to connect to the ip of VM:

click on global tools:

Click on create:

Back to Settings > Network and select adapter 1

Select Adapter only Host.

go inside the VM and get the ip number with ifconfig and get ip address:

ifconfig

In my case the ip is 192.168.56.101

now from terminal I try to connect in ssh to the ip 192.168.56.101

ssh [email protected]

30s ad

Vue.js Essentials - 3 Course Bundle

Sıfırdan İleri Seviye Vue.JS Eğitimi ve Uygulama Geliştirme

Vue.js 2 Basics in just 1 hour FREE

Programador FullStack JS Vue Node: Proj Galeria Vídeo e CRUD

Learn by Doing: Vue JS 2.0 the Right Way

ubuntu

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

How to Install Microsoft Teams on Ubuntu 20.04

In this tutorial, we will show you how to install Microsoft Teams on Ubuntu 20.04 machine. we can install teams using Debian installer file or by adding microsoft repository.

2 Ways to Upgrade Ubuntu 18.04/18.10 To Ubuntu 19.04 (GUI & Terminal)

This tutorial is going to you 2 ways to upgrade Ubuntu 18.04 and Ubuntu 18.10 to 19.04. The first method uses the graphical update manger and the second method uses command line. Usually you use the graphical update manager to upgrade Ubuntu desktop and use command line to upgrade Ubuntu server, but the command-line method works for desktops too.

How to Install TeamViewer on Ubuntu 20.04

In this tutorial, we will walk you through how to install TeamViewer on Ubuntu 20.04 Desktop through the command line using the TeamViewer .deb package.Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges.

How to Install PgAdmin 4 on Ubuntu 20.04

How to Install PgAdmin 4 on Ubuntu 20.04 - We are going to show you how to install pgAdmin4 on Ubuntu 20.04 LTS in Server Mode as a web application using apache2 and Wsgi module.

2 Ways to Upgrade Ubuntu 18.04 To Ubuntu 20.04

2 Ways to Upgrade Ubuntu 18.04 To Ubuntu 20.04 : using the graphical update manager and using the command line. Normally you use ...