Debian Virtual Machine Lost SSH

carlarogers

Member
Joined
Jan 1, 2020
Messages
58
Reaction score
10
Credits
527
CANNOT Connect With SSH

Debian server running as virtual machine under VMWare Fusion with MacOS as the host. It has been working great for years, through upgrades.

I have no idea why anything changed, it was working fine last time I started it up 12 hours ago. I did not notice any problems during shutdown, but now, I cannot connect to this vm with ssh. I have console access, where I ran systemctl status sshd.

Other VM on this same host is working normally.

This is the Misbehaving VM
1593770625865.png


At first I thought listening on 0.0.0.0 was a problem, but I have another vm on this same host and it shows similar output to that command.

IP on Misbehaving Machine Keeps Changing

The problem appears to be the VM is not keeping its IP. It gets its ip from the xfinity router that brings cable into the my home. The router has resevered ip 10.0.0.15 for this VM, based on its MAC Address. Here is the Mac address for the VM and the reserved ip setup for it the router

1593771155834.png



This shows the ip of the misbehaving machine keeps changing instead of keeping to its assigned value.

1593771684319.png



This also shows the ip changing on the misbehaving machine. It can ping the machine that is working correctly, but here you can see the ip of the source of the ping changes on every ping

1593772169634.png



syslog
1593774037418.png



The router says this VM is attached at that correct ip, but this machine is acting like a dork.

I don't know where to go on this. Can you offer any suggestions?
 

Attachments

  • 1593771121000.png
    1593771121000.png
    145.9 KB · Views: 334
  • 1593771590602.png
    1593771590602.png
    442.3 KB · Views: 343
Last edited:


I found the problem. An installation I did with apt yesterday came with a suggestion to run autoremove, which I did. That autoremove took sendmail off the system, I am not sure why. I have phpmailer on this system... anyway, with sendmail gone, it was causing a fail at boot time, you can see in the syslog, where it says Can't open /usr/share/sendmail/dynamic every second. the fix was to reinstall sendmail

Still having a problem getting this thing hooked up to the right ip, but the vm runs fine now. the only problem with switching the ip is it will force me to change some settings in my ide that are a chore.
 
Is your vm's ip set manually or by dhcp(Talking about the vm interface configuration the Debian)? I would think the latter?
 
To set a static IP you don't need to reserve it from the router, it is sufficient to reduce the range in which the dhcp process is allowed to assign IP addresses and statically assign the IP from the machine itself. In your case, you can also leave as it is, the only thing you're required to do is:

edit /etc/network/interfaces as root with the following:

Code:
# The interface that you want to be static
iface <interface:for example eth0> inet static
    # example
    # address 10.10.10.10
    address <the static address you want>
    # example
    # netmask 255.255.255.0
    netmask <the netmask of the address>
    # example
    # gateway 10.10.10.1
    gateway <your default gateway>

If you also want a static dns server of your choice, edit /etc/resolv.conf and put the line:

Code:
nameserver 1.1.1.1

I can be more helpful with more details, and I would be happy to help you more
 

Members online


Top