LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-15-2010, 07:32 AM   #1
DarkSlayer
Member
 
Registered: Apr 2008
Location: Tbilisi , Georgia
Distribution: Fedora, CentOS
Posts: 65

Rep: Reputation: 19
Exclamation can't ssh to guest OS


Hi everyone
Please help me with my issue.

host: windows xp
guest: centos
VM: VMware Workstation 7.0.1

I can't ssh from host to guest
Don't know why.
sshd is running - out of the box, fresh install, nothing added/changed
IP received via dhcp
same lan segment for both host and guest - 192.168.3.0 255.255.255.0
can ping host <-> guest
firewall disabled (host, guest)
selinux disabled

when trying to test local ssh:
Code:
[root@localhost]# ssh localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established
RSA key fingerprent is 8a:xx:xx:xx:xx:xx::x:xx:xx:x:x:x:x ...
Are you sure you want to continue connecting (yes/no)?
Solution By davemcza and someone on tuxradar
In case when host is ms windows based you have to:
Go to device manager, find your NIC, open it. Go to Advanced tab.
Find "Checksum offload" and disable it. don't need to restart host.
Network will be restarted by itself.

Linux based host:
TuxRadar article
sudo ethtool --offload eth0 tx off
sudo ethtool --offload eth0 rx off tx off sg off tso off

google result for checksum offload disable

Last edited by DarkSlayer; 04-21-2010 at 05:54 AM. Reason: solved
 
Old 03-15-2010, 07:39 AM   #2
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 70
Use the -v switch and post the output when you try; you need to be a bit more descriptive
 
Old 03-15-2010, 08:10 AM   #3
DarkSlayer
Member
 
Registered: Apr 2008
Location: Tbilisi , Georgia
Distribution: Fedora, CentOS
Posts: 65

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by jamescondron View Post
Use the -v switch and post the output when you try; you need to be a bit more descriptive
Code:
[root@localhost ~]# ssh -v localhost
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type 1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: loaded 3 keys
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
The authenticity of host 'localhost (127.0.0.1)' can't be established.
RSA key fingerprint is 8a:2c:28:21:5d:96:d7:8e:f9:db:db:42:67:a4:eb:42.
Are you sure you want to continue connecting (yes/no)?
Also as i mentioned it's not first time when i'm having this issue in this lan which is my worklplace. When i'm installing CentOS on physical machines everthing runs great, but VMs ...

Also i've tried ssh-keygen comand, reinstalling openssh apps - nothing helps.
 
Old 03-15-2010, 08:14 AM   #4
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 70
Why are you connecting to localhost and not the centos box/virtual?

A daft question, sure, but thats where the output ends? You are selecting to continue connecting, are you not?
 
Old 03-15-2010, 08:20 AM   #5
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
Do you want to ssh your guest os from your host os?
try with some ssh clients (putty, securecrt or xshell) your output seems ok
or
check the telnet output for port 22

Quote:
[root@localhost]# ssh localhost
why do you do this from your system itself? what senses there?
 
Old 03-15-2010, 08:33 AM   #6
DarkSlayer
Member
 
Registered: Apr 2008
Location: Tbilisi , Georgia
Distribution: Fedora, CentOS
Posts: 65

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by jamescondron View Post
Why are you connecting to localhost and not the centos box/virtual?

A daft question, sure, but thats where the output ends? You are selecting to continue connecting, are you not?
so...
here is further output:
Code:
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
Write failed: Broken pipe
[root@localhost ~]#
i can't ssh with putty from host windows xp.
but it's new vm install absolutelly fresh and clean...
today i'll had tries installing this VM, but when i reinstalled opnssh and it's components, and answered YES...it "connected" to localhost via ssh and asked me for password, i don't know why password and not username first and then password.
UPDATE:
now i've tried to ssh from guest to my other Centos physical machine it succeeded, after sshed from this machine back to my VM (VM->physical->VM) it again said me:
Code:
[root@shadow]# ssh 192.168.3.140
The authenticity of host '192.168.3.140' can't be established
RSA key fingerprent is 8a:xx:xx:xx:xx:xx::x:xx:xx:x:x:x:x ...
Are you sure you want to continue connecting (yes/no)? YES
i logged in my VM, then loged out
tried again ssh into localhost and it worked.....

but still can't ssh from host system into vm.....as i understood RSA key not transfered.........but i can login to my VM at home, and many other VM,,,,and RSA key is being transfered normally to putty....
 
Old 03-15-2010, 08:43 AM   #7
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
As you said you can ping your guest from host os but can't ssh isn't it? check the firewall rule in both host and guest
 
Old 03-15-2010, 08:45 AM   #8
DarkSlayer
Member
 
Registered: Apr 2008
Location: Tbilisi , Georgia
Distribution: Fedora, CentOS
Posts: 65

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by kirukan View Post
why do you do this from your system itself? what senses there?
dunno

just checking integrity and if it basically works
 
Old 03-15-2010, 08:48 AM   #9
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 70
Quote:
Originally Posted by DarkSlayer View Post
it "connected" to localhost via ssh and asked me for password, i don't know why password and not username first and then password.
Because if you don't give it a username it takes the username you're currently using.

I might still be completely lost here, but which of those is the connection from your windows box, or as you termed it 'host', to the 'guest'?
 
Old 03-16-2010, 01:51 AM   #10
DarkSlayer
Member
 
Registered: Apr 2008
Location: Tbilisi , Georgia
Distribution: Fedora, CentOS
Posts: 65

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by jamescondron View Post
I might still be completely lost here, but which of those is the connection from your windows box, or as you termed it 'host', to the 'guest'?
none of this examples are connection from windows(host) to centos(guest)
i can't give you any output of this tries - just nothing happens
or if some one needs it, i can post screenshot of empty Putty(or Kitty) window(s)
 
Old 04-09-2010, 08:49 AM   #11
davemcza
LQ Newbie
 
Registered: Apr 2010
Posts: 5

Rep: Reputation: 2
Have a look at this: www . tuxradar . com / answers / 488

This person is running vmware on a linux machine, and found that the routing is being bypassed for certain protocols and handed over to the network card to do.

So, he solves the problem by changing setting on the Linux based host that prevent the network card from being given that responsibility.

I have exactly the same setup and problem as you, I can ping my virtual machine from XP and my virtual machine can ping it's XP host. But, any other protocols except for ICMP seem to be unable to complete the route.

I was running VMWare on a different machine before, I got this new (and improved) machine and now I sit with this problem that I have not had before, so this seems to be the same problem ... i.e. Hardware related.

So, I will now go looking for a place in Windows XP where the equivalent of:
sudo ethtool --offload eth0 tx off
or
sudo ethtool --offload eth0 rx off tx off sg off tso off

can be applied.

Any suggestions as to where?

Last edited by davemcza; 04-09-2010 at 08:50 AM.
 
Old 04-09-2010, 09:06 AM   #12
davemcza
LQ Newbie
 
Registered: Apr 2010
Posts: 5

Rep: Reputation: 2
Okay, I looked in the logical place, turned off everything that said "offload", and I can now open the SSH window on my XP Machine to my Virtual Machine.

In your Windows XP Host machine, as follows:

Network Connections -> Local Area Connection -> Properties
Click on the CONFIGURE button next to the network card controller.
Click on the ADVANCED tab.
I DISABLED:
- Checksum Offload (Was on RX & TX Enabled)
- Flow Control (Was on Enabled)
- Large Send Offload (Was on Enabled)

I then rebooted and started up the Virtual Machine, and could SSL to it.
Eureka!

Let us know if this works for you please.
 
Old 04-09-2010, 09:12 AM   #13
davemcza
LQ Newbie
 
Registered: Apr 2010
Posts: 5

Rep: Reputation: 2
Further refinement:

I have set only Checksum Offload to Disabled and the SSL still works.

Last edited by davemcza; 04-09-2010 at 09:14 AM. Reason: added "only"
 
Old 04-18-2010, 12:09 PM   #14
DarkSlayer
Member
 
Registered: Apr 2008
Location: Tbilisi , Georgia
Distribution: Fedora, CentOS
Posts: 65

Original Poster
Rep: Reputation: 19
davemcza
Thank you man! Great tips!
Hope those are final solution tips for evryone with such problem.
I'll try them as soon as i get to VM at work

Regards!
 
Old 04-20-2010, 11:39 AM   #15
davemcza
LQ Newbie
 
Registered: Apr 2010
Posts: 5

Rep: Reputation: 2
Let me guess ... that did not work. :-( ?
 
  


Reply

Tags
guest, host, ssh, vm, vmware



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Install Guest additions and run fullscreen mode on VirtualBox Guest OS | Linux LXer Syndicated Linux News 0 01-17-2010 05:30 PM
Provide only ssh access to a guest user lothario Linux - Newbie 5 08-02-2009 04:38 PM
problem installing guest additions in Fedora 11 guest (virtualbox) mia_tech Linux - Desktop 9 07-28-2009 12:15 AM
access to a guest OS via ssh htamayo Linux - Networking 1 04-02-2009 08:58 PM
SSH on a Red Hat 9.0 VM guest question THE RADICAL Red Hat 1 01-12-2005 01:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration