Answer the question
In order to leave comments, you need to log in
Why is the displayed IP address not valid when entering ifconfig?
Hello. The displayed IP when entering the ifconfig command is not suitable for connecting to PuTTY. I reviewed a bunch of videos from youtube, everyone has an IP address of 10.0.2.15, and the one that everyone enters into PuTTY looks like 192.168 ...... What could be my problem and how can I fix it? Thanks to!
Answer the question
In order to leave comments, you need to log in
Here are the options:
1. ssh is not running
2. The ssh port is closed by firewall rules
3. ssh is not hosted on the standard port
4. You are choosing the wrong settings in putty
5. There is no communication/routing between the putty machine and the server.
6. Etc.
Apparently, you are using Virtual Box, while your Ubuntu guest OS is running behind NAT. Your host PC simply does not know what kind of subnet this 10.0.2.0 is, how to reach it.
To get access via ssh, first make sure that you have ssh installed and running
Next
sudo service ssh status
, the solutions are as follows
Method 1
router (or use a statically configured IP).
Go to the virtual machine settings > Network > Connection type - Network bridge
2. In Putty, enter the IP address of the guest OS (it will no longer be 10.0.2.15, but from under the router network)
Method 2
1. If you need to use NAT for some reason, then you need to configure port forwarding through NAT - Go to virtual machine settings> Network> Advanced> Port forwarding
Host address 192.168.X.X (your local IP on the network interface)
Port 22
Guest address 10.0.2.15
2. In putty enter the IP of your PC ( 192.168.X.X ).
If it doesn’t work out or you don’t understand something, write, I will write in more detail.
Why is ifconfig not showing the IP address?
As an option: ping from the host where putty is and see if packets are dropped along the way.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question