You are not logged in.

#1 2021-11-01 13:00:49

hwallace
Member
Registered: 2021-08-30
Posts: 107

[SOLVED] installer on VM refusing SSH from host

I'm creating a VirtualBox VM using the Nov 1 installer and can't get a SSH connection to the running installer.

- I have set the root passwd.
- The /etc/ssh/sshd_config is set to permit root logins.
- systemctl status reports sshd is running, listening on 22
- I can ssh from the installer back to the host
- I can ping the installer (10.0.2.15) from the host
- Firewall inactive both sides

Then there's this:


:> ssh -vvv root@10.0.2.15
OpenSSH_8.8p1, OpenSSL 1.1.1l  24 Aug 2021
debug1: Reading configuration data /home/hym/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/hym/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/hym/.ssh/known_hosts2'
debug2: resolving "install" port 22
debug3: resolve_host: lookup install:22
debug3: ssh_connect_direct: entering
debug1: Connecting to install [10.0.2.15] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x48

and then we wait...

Last edited by hwallace (2021-11-01 16:13:53)

Offline

#2 2021-11-01 15:04:12

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: [SOLVED] installer on VM refusing SSH from host

Does sshd_config enable password authentication?

PasswordAuthentication yes

Offline

#3 2021-11-01 15:46:11

hwallace
Member
Registered: 2021-08-30
Posts: 107

Re: [SOLVED] installer on VM refusing SSH from host

tucuxi wrote:

Does sshd_config enable password authentication?

PasswordAuthentication yes

Yes it is.
To be sure I removed the comment to expose the default and then restarted the server. This in case some maintenance code was overriding that default.
No change.

sshd_config https://pastebin.com/9sfgahsL

I've now set LogLevel to VERBOSE. Not seeing any log in /var/log.

Last edited by hwallace (2021-11-01 16:01:30)

Offline

#4 2021-11-01 15:59:12

Maniaxx
Member
Registered: 2014-05-14
Posts: 738

Re: [SOLVED] installer on VM refusing SSH from host

Which network mode are you running?


sys2064

Offline

#5 2021-11-01 16:00:24

hwallace
Member
Registered: 2021-08-30
Posts: 107

Re: [SOLVED] installer on VM refusing SSH from host

Maniaxx wrote:

Which network mode are you running?

NAT

Offline

#6 2021-11-01 16:03:45

Maniaxx
Member
Registered: 2014-05-14
Posts: 738

Re: [SOLVED] installer on VM refusing SSH from host

Then you have to port forward port 22.

To configure port forwarding you can use the graphical Port Forwarding editor which can be found in the Network Settings dialog for network adaptors configured to use NAT. Here, you can map host ports to guest ports to allow network traffic to be routed to a specific port in the guest.
https://www.virtualbox.org/manual/ch06.html#natforward

Last edited by Maniaxx (2021-11-01 16:04:58)


sys2064

Offline

#7 2021-11-01 16:13:31

hwallace
Member
Registered: 2021-08-30
Posts: 107

Re: [SOLVED] installer on VM refusing SSH from host

Maniaxx wrote:

Then you have to port forward port 22.

To configure port forwarding you can use the graphical Port Forwarding editor which can be found in the Network Settings dialog for network adaptors configured to use NAT. Here, you can map host ports to guest ports to allow network traffic to be routed to a specific port in the guest.
https://www.virtualbox.org/manual/ch06.html#natforward

Ah!

I usually use a bridged adaptor but thought it would be simpler to use NAT this time. I switched it to use a bridge adaptor and now all is well.

Thanks

Offline

Board footer

Powered by FluxBB