Doing ssh to Virtual machine (uses RHEL 4 thru VMWARE in Windows XP)
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Doing ssh to Virtual machine (uses RHEL 4 thru VMWARE in Windows XP)
Hi,
I am struggling to connect my Virtual machine in VMWare (RHEL) from another machine or even from my host machine (XP) using Cygwin. I want to do ssh/scp to the virtual machine using the Virtual machines ip address. I have tried various setting for VMWARE connection(Network Adapter setting) like Bridged/NAT/Custom. But am not able to connect to guest OS from outside. But I can connect from inside Virtual machine to other Linux machines thru ssh. Please help me out in that.
Thanks in advance!
-pratap
Yes...Iptables status is on. Also I can ping into the ip address which results from /sbin/afconfig. But I am not able to do ssh into the virtual machine.
bash-3.2$ ping 192.168.24.128
PING 192.168.24.128 (192.168.24.128): 56 data bytes
64 bytes from 192.168.24.128: icmp_seq=0 ttl=64 time=3 ms
64 bytes from 192.168.24.128: icmp_seq=1 ttl=64 time=0 ms
64 bytes from 192.168.24.128: icmp_seq=2 ttl=64 time=1 ms
64 bytes from 192.168.24.128: icmp_seq=3 ttl=64 time=2 ms
Vmnet8 is usually a NAT connection, this will prevent inbound connections to the vm from anything other than the host. If you want to connect to the vm from another machine on the network you will need to change the vm's network type to bridged.
Please switch the network type then restart the vm, the new ip address for the vm should be in the same network range as the host machines 'Local Area Connection 2'
<edit>In regard to your first question - no, when you connect via ssh from one machine to another, you are running the 'ssh' client on your machine to connect to the 'sshd' server on the other machine. Connecting from one to the other does not necessarily mean the reverse is possible</edit>
<edit2>To confrm sshd is running on the vm, run 'service sshd status'. There is also another possibility, please post the contents of /etc/hosts.allow and /etc/hosts.deny from the vm</edit2>
Thanks for the suggestion.
Yes...I changed it now to bridges connection and am getting ip address in the range of LAN2. Host has ip 192.168.1.5 where as now the VM has ip 192.168.1.11.
The content of the file "/etc/hosts.deny" is as follows.
Code:
#
# hosts.deny This file describes the names of the hosts which are
# *not* allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow. In particular
# you should know that NFS uses portmap!
The content of the file "/etc/hosts.allow" is as follows.
Code:
#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
Attached is a snapshot of the services which tells that sshd services are running.
Do I need to do anything else to access my Virtual OS from host or any other system?
Thanks,
Pratap
- stop iptables then attempt connection ( just in case we missed something )
- sshd may be running on a non-standard port, please post the content of /etc/ssh/sshd_config
Ohh...Yes...
After stopping the service "iptables" it works.
Now please tell me how do I configure the "iptables" to have an access thru ssh even if that service is on.
Attached is the file "/etc/ssh/sshd_config"
Thanks a lot for the invaluable help!
Cheers,
Pratap
Last edited by pratap.iisc; 01-31-2010 at 05:45 PM.
Thanks again for the hints. Actually in RHEL4 I couldn't find any thing like 'system-config-firewall-tui' but there was 'system-config-securitylevel-tui' and I made changes in that to access only ssh and it works fine.
Cheers,
Pratap
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.