LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-08-2010, 09:58 AM   #1
oo-ves
LQ Newbie
 
Registered: Jun 2010
Posts: 6

Rep: Reputation: 0
Cannot ssh to Ubuntu box from Windows laptop.


I've just set up OpenSSH on my Ubuntu 8.04 box. Observe no firewall in system services list on ubuntu box. Attempt to ssh using putty from windows laptop attached to same router.

Putty connection times out. Can ping ubuntu box from laptop.

What might I be doing wrong?

Thanks,

Owen.
 
Old 06-08-2010, 10:01 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Are you connecting to the right address?

Is SSHd running on the server?
 
Old 06-08-2010, 10:01 AM   #3
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello and Welcome to LinuxQuestions,

Did you install the SSH server on your Ubuntu box? Check with this:
Code:
which sshd
and if you installed check with this if it's running:
Code:
ps -ef | grep sshd
If both are true then check if you have it listening:
Code:
netstat -aln | grep ":22"
Kind regards,

Eric
 
Old 06-08-2010, 10:03 AM   #4
ctkroeker
Senior Member
 
Registered: May 2005
Posts: 1,565
Blog Entries: 1

Rep: Reputation: 50
Make sure SSH is running on Ubuntu:
Code:
ps -ae | grep sshd
It should return something like:
Code:
720 ?        00:00:00 sshd
 
Old 06-08-2010, 10:09 AM   #5
blue_print
Member
 
Registered: May 2010
Location: In world
Distribution: RHEL, CentOS, Ubuntu
Posts: 275
Blog Entries: 3

Rep: Reputation: 50
Please make sure that you have installed openssh-server package in Ubuntu and check whether SSH is running with "ps -ef | grep ssh".
 
Old 06-09-2010, 02:56 AM   #6
oo-ves
LQ Newbie
 
Registered: Jun 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Apparently, every thing's fine on Ubuntu box:

Code:
owen@stage-hub:~$ which sshd
/usr/sbin/sshd
owen@stage-hub:~$ ps -ef|grep sshd
root      4820     1  0 17:28 ?        00:00:00 /usr/sbin/sshd
owen      5856  5806  0 17:45 pts/0    00:00:00 grep sshd
owen@stage-hub:~$ netstat -aln|grep ":22"
tcp6       0      0 :::22                   :::*                    LISTEN     
owen@stage-hub:~$
Curiously, I cannot ping Windows laptop from Ubuntu box.

Could this be a firewall problem on my Windows laptop? Could it be a problem with my router?

Thanks,

Owen.
 
Old 06-09-2010, 03:11 AM   #7
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

Can you post your IP configuration of both your Windows and Ubuntu box? Do you have SELinux enabled on Ubuntu? Check with:
Code:
sestatus
Can you ping your router from both boxes?

Kind regards,

Eric
 
Old 06-09-2010, 04:38 AM   #8
CmdoColin
Member
 
Registered: Jul 2009
Posts: 31

Rep: Reputation: 17
Can't ping the Windows machine... this disturbs me/ The Windows firewalls have honestly caused me a lot of head aches - that's not just a Linux fan boy talking. Might be worth seeing if you can disable this for testing temporarily if it's a safe environment.

Personally I'd want to be able to ping the IP addresses of both devices (and the IP of the router). Might be worth checking the arp table if you are seeing any oddities. Will kinda look like this in a Linux:

Code:
XXXX$ arp -a
? (192.168.1.1) at 00:24:c4:12:34:56 [ether] on eth0
? (192.168.1.2) at 00:50:7f:12:34:56 [ether] on eth0
and this in Windows:

Code:
C:\Users\XXXX>arp -a

Interface: 192.168.1.105 --- 0xb

  Internet Address      Physical Address      Type
  192.168.1.1           00-24-c4-12-34-56     dynamic
  192.168.1.2           00-50-7f-12-34-56     dynamic
I'd be wanting to see everything on the LAN there.
 
Old 06-10-2010, 04:09 AM   #9
oo-ves
LQ Newbie
 
Registered: Jun 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Can ping router from Ubuntu.

Hence, believing problem is with Windows laptop, I opened a command line session on my Windows laptop and did what CmdoColin suggested:

Code:
C:\Documents and Settings\Owen Thomas>arp -a

Interface: 192.168.1.64 --- 0x2
  Internet Address      Physical Address      Type
  192.168.1.254         00-1f-9f-d2-84-a0     dynamic
Curiously, the Ubuntu box (192.168.1.67) does not appear.

Believe therefore that remedy lies with Windows config. Although this is a linux discussion group, I would appreciate a fix to this problem.

Thanks,

Owen.
 
Old 06-10-2010, 04:10 AM   #10
oo-ves
LQ Newbie
 
Registered: Jun 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Windows XP SP3 I believe.
 
Old 06-10-2010, 07:17 AM   #11
CmdoColin
Member
 
Registered: Jul 2009
Posts: 31

Rep: Reputation: 17
You were able to ping the Ubuntu machine from your XP machine previously. Try this again, and then check your arp tables again on both machines. If not used / machine is rebooted, they can not be there.

If the mac address again isn't appearing in the arp table then generically check your hardware. Otherwise I'd disable an re-enable the Ethernet port hardware in windows and check the drivers.

Otherwise check the device they connected together with. If it's your internet router; it might be worth checking there is no firewall rules between ports.
 
Old 06-10-2010, 09:27 AM   #12
oo-ves
LQ Newbie
 
Registered: Jun 2010
Posts: 6

Original Poster
Rep: Reputation: 0
It might be a trivial note, but the Windows to router is Wireless, Ubuntu to router is Ethernet.

Ubuntu and Windows have been rebooted. Pinged Ubunto and Windows from each to the other as suggested, and retried arp. Running arp reports address of Ubuntu from Windows and vice versa.

Router reports firewall is disabled. This, to me, is still suggestive of a Windows firewall problem.

Hmmm... I disable Windows firewall, and still cannot reach ssh. Very ponderous. I might require some on-site help.

Owen.
 
Old 06-10-2010, 09:52 AM   #13
SuperJediWombat!
Member
 
Registered: Apr 2009
Location: Perth, Australia
Distribution: Ubuntu/CentOS
Posts: 208

Rep: Reputation: 51
Quote:
Originally Posted by oo-ves View Post
Apparently, every thing's fine on Ubuntu box:

Code:
owen@stage-hub:~$ netstat -aln|grep ":22"
tcp6       0      0 :::22                   :::*                    LISTEN
sshd is not listening on ipv4.


Please run these commands, and post the output.
Code:
ip route
ifconfig
sudo netstat -tlnp
service ssh status
sudo iptables-save

Thanks,
SuperJediWombat
 
Old 06-10-2010, 10:11 AM   #14
djsmiley2k
Member
 
Registered: Feb 2005
Location: Coventry, UK
Distribution: Home: Gentoo x86/amd64, Debian ppc. Work: Ubuntu, SuSe, CentOS
Posts: 343
Blog Entries: 1

Rep: Reputation: 72
Doesn't most OpenSSH packages ship with all the "listening" options disabled by default in the config?

I know for sure that gentoo ships with the

#port 22
#192.168.0.0/24

both commented out for security reasons (Only enable exactly what you need). This means anyone who might of accidently installed openSSH in the past and then had it turned on randomly.

I notice no one else appears to have checked this yet - I'm not sure where the config file is on this distrobution, but I'd reccomend checking the listening options.
 
Old 06-10-2010, 06:44 PM   #15
SuperJediWombat!
Member
 
Registered: Apr 2009
Location: Perth, Australia
Distribution: Ubuntu/CentOS
Posts: 208

Rep: Reputation: 51
Ubuntu should be listening on 0.0.0.0:22 and :::22 by default.
Run this and post the output please:
Code:
grep -v '^#\|^$' /etc/ssh/sshd_config
 
  


Reply



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
What Laptop will work with Ubuntu OUT THE BOX? Triumph Linux - Newbie 2 05-09-2008 09:11 AM
how to ssh into windows machine from Linux box chaitanya_ralegaonka General 3 09-04-2007 12:09 PM
ssh tunneling to a windows box problem blimbo Linux - Software 2 01-12-2006 05:16 AM
ssh to place windows box into standby? dasbooter Linux - Software 2 08-18-2005 06:27 PM
Can you SSH to a Windows Box? Thaidog Linux - Newbie 5 10-01-2002 08:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:58 AM.

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