I have a an Oracle Linux VM running in Oracle Virtual box. I am trying to connect to the VM using Putty but I get the message 'Network Error: Connection Refused'. If i ping the VM that works. 'ifconfig', executed from the console shows the expected IP address and netmask info. The same VM, running on my laptop (I know it's the same because it's the same Oracle appliance OVA), I can communicate with that VM using putty so ssh must be working.
The VM on both computers are using host only networking.
does it connect ? (or make a connection)
I tried using telnet from putty but that did not work either.
The exact vm or a copy?
If a copy is the network card pointed to the existing network card on the non working machine?
1. there is no service listening on TCP 22
2. there is communication error, or wrong IP Address.
have a look at this article to confirm 22 is listening in the VM
I ran the 'netstat -tulpn | grep LISTEN' command as suggested in the article above and to the output attached.
can you ping the VM to which you are trying to connect but can not?
netstat -rn on the VM to whcih you are trying to connect but fail.
The image shows that the SSH service is running and listening on all interfaces, 0.0.0.0:22 LISTEN
Connection refused could also be the result of a TCP_WRAPPERS rules
more /etc/hosts.allow /etc/hosts.deny
check the IP of your windows system.
check the VMs /var/log/secure to see whether it has info why a connection was denied.
Can the problematic VM be accessesvia Purty from the host on which it is running?i
The screenshot 'Screenshot 2023-02-18 104717.png' shows the results from more /etc/hosts.allow /etc/hosts.deny.
The word document attached 'Desktop PC' shows the network setup on the host PC and details from the VM. Also shown is the contents of '/var/logs/secure'. I would have preferred to FTP the file and attach it but I could not.
Also included in the word doc is a screen dump showing the output from 'netstat -rn'.
The word document 'Laptop PC' shows the same from the system where Putty does connect. I have also attached the output for netstat and a copy of the secure file from the laptop.
Or the Documents werre not attached?
what is the OVA, can anyone download it ?
Hang on here
The VM on both computers are using "host only networking."
that only allows communication between host and VM ?
So just to confirm you are on the HOST and using PuTTY to communication connect to the Guest VM ?
and Oracle Virtual box is running on two different Windows Hosts, and one works (which is your laptop) and one does not ? (which is your computer).
Have you just tried to confirm for test purposes, changing to NAT and Bridged, and check again if a NAT and Bridged connection work (ssh) just to prove the Host Only networking is broken.
The OVA in question is an Oracle applications Appliance VM. Anyone can download it from 'https://edelivery.oracle.com/osdc/faces/SoftwareDelivery'. It is rather large, zipped it is 70Gb. Assembled and unzipped 300Gb
NAT changed the IP address of the VM causing the failure of the software running on the VM.
It is normal for the IP Address to change if changing from Host only to NAT or Bridged, as for failure of the VM, not sure don't know the VM.
Rather large at 300GB!
Oracle applications Appliance VM - gives many appliances, if you could be more specific, as to exact name.
You posted one image, but it is not clear to me which one, the one that is working or the one that does not?
Does the VM to which you are not able to connect, access the outside?
Communications between host and guest only
On the desktop and related VM, change the host to. VM network from 255.255.0.0 to 255.255.255.0
And see if it makes a difference to allow the desktop putty connection from how to VM.
Make sure the VM on the desktop host reflects the change in netmask.
I’ll download VM later but let oks PC config specific if it works on laptop
Your VM and the Virtual network gateway on the host are using the same IP 192.168
It seems that based on your current configuration 192.168.1.11 is the default gateway for the VM.
Change the VM IP to something like 192.168.1.1 mask 255.255.255.0 and gateway of 192.168.1.11 and you shouod have access from the host running putty to connect to the VM on IP 192.168.1.1
You've lost me, where do I have a gateway set?
The IP of the HOST's VirtualBox adapter is the Gateway for the VM guests to use not.
Change the VM guest's IP to anything other than 192.168.1.11 and use the 192.168.1.11 as the gateway if you need this VM to be able to connect out.
note once you change the IP of the VM to anything other than .11.
the host will be able to connect to the VM via the new IP.
Make the VM have the IP 192.168.1.2 netmask 255.255.255.0 default gateway 192.168.1.11
your setup is
/ Computer Host 1 <=> VM1
Internet <=> router <=> Switch <=>
\Computer host 2 <host VirtualBox IP 192.168.1.2> <=> <VM IP 192.168.1.11 what is the gateway it is pointing to 192.168.1.1?>
Once you changed the HOST Virtual adapter IP to 192.168.1.2, can you ping 192.168.1.11 still and can you ssh to it now?
Can you repost the same data you did last time.
From The VM : ip addr, netstat -rn
from the Host: ipconfig /all
Please note that in the prior post, the status of the Media on the VirtualBox adapter seems to have suggested Media State: Media Disconnected
Perhaps it was clipped. If possible from the host, post text versus images,
right-click, mark and you can select the entire output through scrolling from the top down.
Usually, the VirtualBox host Adapter would be automatically, .1 as the default routing the first IP is used as the default gateway.
is ssh running on the VM?
ps -ef | grep ssh
also on the host
arp -a 192.168.1.11
compare it the HW address on the VM to make sure they match, alpha-numeric characters only, disregard the : in the windows output.
This is to confirm you are accessing/connecting to the same system/vm.
What is even more weird is that I can access the Oracle application from the browser (has shown in the last two screen shots), it is just terminal access which does not work.
Tried shutting down iptable in order to disable the firewall, got the message iptables service not loaded as shown in last screendump
ps -ef | grep firewalld
try sudo firewall-cmd --list-all
the item you are looking for is Services: and to see whether ssh is on that list.