VMware Communities
sprotsman
Contributor
Contributor
Jump to solution

connect to guest via remote ssh

Host: VMware 6.0.2 running on OpenSUSE 10.3 (10.0.1.10)

Guest: Ubuntu 8.04 (192.168.242.128)

I'd like to ssh into the guest from my MacBook (10.5.2). I've added a route on the MacBook which only allows me to ping the 192.168.242.1 address (vmnet8 interface) of the host.

$ sudo route add 192.168.242.0 10.0.1.10

Does anyone have any suggestions on how to ssh into the VMware guest? The guest is using NAT in VMware's settings. I rather not switch this to 'bridged'. I can ssh into the guest from the host.

--Shawn

Tags (5)
0 Kudos
1 Solution

Accepted Solutions
Peter_vm
Immortal
Immortal
Jump to solution

Does your OpenSUSE host act as a router (IP forwarding enabled)? If not, use port forwarding.

You need to configure port forwarding on VMware NAT to allow forwarding of 10.0.1.10:10022 to 192.168.242.128:22

Then just ssh to 10.0.1.10:10022 from your MAC to get connection to your guest.

You need to modify

/etc/vmware/vmnet8/nat/nat.conf

and restart your host or its vmware nat service.

View solution in original post

0 Kudos
5 Replies
Peter_vm
Immortal
Immortal
Jump to solution

Does your OpenSUSE host act as a router (IP forwarding enabled)? If not, use port forwarding.

You need to configure port forwarding on VMware NAT to allow forwarding of 10.0.1.10:10022 to 192.168.242.128:22

Then just ssh to 10.0.1.10:10022 from your MAC to get connection to your guest.

You need to modify

/etc/vmware/vmnet8/nat/nat.conf

and restart your host or its vmware nat service.

0 Kudos
sprotsman
Contributor
Contributor
Jump to solution

Thanks, Peter. I'll try this when I return to the office Monday morning.

0 Kudos
sprotsman
Contributor
Contributor
Jump to solution

I edited /etc/vmware/vmnet8/nat/nat.conf by adding the following under the section:

10022 = 192.168.242.128:22

10023 = 192.168.242.129:22

I then restarted the host and attempted to ssh into either guest.

@naiad ~] ssh 10.0.1.10:10022

ssh: Error resolving hostname 10.0.1.10:10022: nodename nor servname provided, or not known

I also opened up 10022 and 10023 on the the host firewall (10.0.1.10).

Ideas?

0 Kudos
sprotsman
Contributor
Contributor
Jump to solution

All is well! Apparently my ssh command wasn't correct. I restarted vmware services again then entered my 'new' ssh command:

openSUSE 10.3 host runnning VMware Workstation 6.0.2:

@deimos ~] sudo /usr/lib/vmware/net-services.sh restart

MacBook running 10.5.4:

@naiad ~] ssh -p 10022 deimos

The authenticity of host '[deimos]:10022 (http://10.0.1.10:10022)' can't be established.

RSA key fingerprint is 3a:53:78:61:70:0d:c6:02:41:94:a7:41:ac:b3:3b:2e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '[deimos]:10022,[http://10.0.1.10|http://10.0.1.10]:10022' (RSA) to the list of known hosts.

user@deimos's password:

Linux hh64 2.6.24-19-generic #1 SMP Wed Jun 18 14:15:37 UTC 2008 x86_64

The programs included with the Ubuntu system are free software;

the exact distribution terms for each program are described in the

individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by

applicable law.

To access official Ubuntu documentation, please visit:

http://help.ubuntu.com/

Last login: Fri May 16 17:33:02 2008 from 192.168.242.1

/home/user

user@hh64:~$

Thanks for the tip!

0 Kudos
amfpg
Contributor
Contributor
Jump to solution

if i use windows as host and linux as guest how to modify the nat configuration so i can ssh into linux guest?

0 Kudos