Unable to connect to Linux VM on virtual box from my host IP

Hi @namratasawalamdocs,
Can you please check the sshd service status?

Regards,

hi @Tej-Singh-Rana sshd is active and running state

Hello @namratasawalamdocs
Try to edit the sshd_config file in /etc/ssh/sshd_config

nano /etc/ssh/sshd_config

Add a line in the Authentication section of the file that says PermitRootLogin yes . This line may already exist and be commented out with a “#”. In this case, remove the “#”.
And the same thing for the PasswordAuthentication yes line as well.

PermitRootLogin yes
PasswordAuthentication yes

And finally, restart the sshd service systemctl restart sshd

hi @Ayman
follow above steps still not able to login through

Hi @namratasawalamdocs,

Can you please try once from the command line and share the output of the following command?

ssh -vvv osboxes@IP-ADDRESS-OF-VM

Regards,

Hi @Tej-Singh-Rana ,below is the output of above command

You need to run this command from the host machine (WINDOWS).

Below is the output from hostmachine

Please replace IP-ADDRESS-OF-VM with your VM ip address.

Please feel free to paste the output here. I just wanted to let you know that you don’t need to share the screenshot.
Just use triple backtick → press enter → paste output → close with triple backtick again.

Example: -

```
PASTE OUTPUT HERE
```

Regards,

thanks @Tej-Singh-Rana ,if possible can you share me the steps how to change IP-ADDRESS-OF-VM

Go to your virtualbox machine terminal and type ip a

below is the ouput from virtual terminal

[osboxes@osboxes ~]$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:82:77:6d brd ff:ff:ff:ff:ff:ff
inet [192.168.0.113/24] brd 192.168.0.255 scope global dynamic noprefixroute enp0s3
valid_lft 78871sec preferred_lft 78871sec
inet6 fe80::5255:9ce9:96c4:7810/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:ec:ab:7d brd ff:ff:ff:ff:ff:ff
inet [192.168.122.1/24]brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN group default qlen 1000
link/ether 52:54:00:ec:ab:7d brd ff:ff:ff:ff:ff:ff

can you plz share me what is next step

ssh -vvv [email protected]

finally able to access virtual machine through Mobaxterm thank you so mucj @Tej-Singh-Rana

How? Did you find the problem? :thinking:

ssh -vvv [email protected] used this command in host machine and used same IP address in mobaxterm so it work

Glad it worked for you. :+1: :innocent:

Hello I have the same problem and exactly followed eveything till ssh -vvv osboxes@issuedmyipaddress
I am still having an issue with SSH
coudld you please help

I fixed it myself
I was using the wrong ip address and was actually using the ip address of virbr0 instead of enp0s3
thank you