K
K
Kero8yte2020-02-04 12:22:29
Virtualization
Kero8yte, 2020-02-04 12:22:29

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!5e39379a98a99535507688.png5e393c09c004b429564904.png

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Alexey Dmitriev, 2020-02-04
@SignFinder

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.

J
Jolly777, 2020-02-06
@Jolly777

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.

R
Robur, 2020-02-04
@Robur

Why is ifconfig not showing the IP address?

everything shows - 10.0.2.15 and 127.0.0.1
the address does not have the "necessary form". It's like you watched that in a video on YouTube someone has the address "Lenin Avenue-10" and you are trying to find the same one at your house.
why you can't connect is a completely different question that you didn't ask.
HZ what are you doing there, but as a bonus, I can advise you to start using 10.0.2.15

S
SrGennadiy, 2020-02-06
@SrGennadiy

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 question

Ask a Question

731 491 924 answers to any question