LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-14-2003, 08:00 PM   #1
breakerfall
Member
 
Registered: Jun 2003
Location: Manchester, UK
Distribution: Gentoo
Posts: 306

Rep: Reputation: 30
Can't SSH into Gentoo from win2k


Hey there...

I have 2 machine, one running win2000pro and the other running linux Gentoo 1.4 with openSSH 3.6.1p2 and I just can't SSH into the linux box through windows.

I have managed to SSH into someone elses box in the past. Is there anything in particular I need to do? I'm using putty.exe through windows and it gives me "connection refused". I have done relevant port forwarding etc. I have even set the linux box to the DMZ so it's totally unprotected but still, no joy

Does anyone have any ideas as to what could be stopping me from SSHing into the linux box?

Please don't take for granted that I have set everything up correctly, as I haven't dabbled much with this and have probably missed out something too obvious to know

Thanks
 
Old 08-14-2003, 08:16 PM   #2
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
Any entries in hosts.allow/hosts.deny or firewall settings?
 
Old 08-14-2003, 09:48 PM   #3
dkaplowitz
Member
 
Registered: Oct 2002
Location: Havertown PA
Distribution: Ubuntu/RHEL/Fedora
Posts: 253

Rep: Reputation: 31
Can you ssh into localhost from the gentoo box? (from command "ssh localhost") If you can't then maybe sshd isn't started and listening. If you can, but you can't from the Windows box on your LAN, then look to some type of firewall and/or security setting that you have that either doesn't allow that host, or doesn't allow ssh connections.
 
Old 08-15-2003, 02:09 AM   #4
joseph
Member
 
Registered: Jun 2003
Location: Batam
Distribution: Ubuntu 10 And Linux Mint
Posts: 414

Rep: Reputation: 30
maybe i know how to solve your problem.
go to your windows boxes, right click my computer select properties and then select user tab, enable the guest account.
it is so simple but u must make sure that your linux boxes have installed an openssh and already listening to port 22.

Will it help you?
 
Old 08-16-2003, 09:03 AM   #5
breakerfall
Member
 
Registered: Jun 2003
Location: Manchester, UK
Distribution: Gentoo
Posts: 306

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by dkaplowitz
Can you ssh into localhost from the gentoo box? (from command "ssh localhost") If you can't then maybe sshd isn't started and listening. If you can, but you can't from the Windows box on your LAN, then look to some type of firewall and/or security setting that you have that either doesn't allow that host, or doesn't allow ssh connections.
Spot on mate! It can't connect. I was playing around with ssh settings but have nooooo idea how to actually activate the thing. Is it just a single command that I'm missing?

This is what I see when running sshd command:
Quote:
bash-2.05b# sshd
Could not load host key: /etc/ssh/ssh_host_key
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Disabling protocol version 1. Could not load host key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting.
Thanks for the help
 
Old 08-16-2003, 09:14 AM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 69
/etc/init.d/sshd start



Cool
 
Old 08-17-2003, 09:52 AM   #7
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 69
Any word on if this worked or not?

Cool
 
Old 08-19-2003, 06:18 AM   #8
breakerfall
Member
 
Registered: Jun 2003
Location: Manchester, UK
Distribution: Gentoo
Posts: 306

Original Poster
Rep: Reputation: 30
excellent. Thanks for the reply :-)

The service actually starts [needs to be ran in SU] but I still can't connect and putty gives me the error "connection refused". I have checked my router and everything is fine. The 22 port is forwarded to the internal IP of the gentoo box.

I know it's not the router/firewall though because the command to connect to localhost doesn't work. Again, connection refused.

Any ideas? Thanks a lot. I really appreciate the help
 
Old 08-19-2003, 08:06 AM   #9
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 69
Make sure you aren't logging in as root through ssh, also check that you don't have an IPTables set of rules that block it.

Finally, check your ssh config, and see if it's setup properly to allow connections

Cool
 
Old 08-19-2003, 01:02 PM   #10
breakerfall
Member
 
Registered: Jun 2003
Location: Manchester, UK
Distribution: Gentoo
Posts: 306

Original Poster
Rep: Reputation: 30
Hi...

I'm not logging on through SSH at all. I can't log on. When trying to make the ssh connection, it fails, hence the connection refused message. This is with localhost AND remote host. I'm at a loss. Last I checked the ssh config files were fine. I can't access the sshd configs as they don't seem to exist where the ssh help states [/etc/conf.d/sshd].

I am running the computer in my user mode and then loading up and console window and starting SSH through SU. [probably not relevant but when I use command to start, it works and says started, when I command it to stop it says that it has been stopped but then when trying to startup again it says that the service has already been started :?]

Any help appreciated

Thanks
 
Old 08-19-2003, 05:23 PM   #11
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 69
Can you post up the full output of:
ps aux

If you wanna slice it down ( I don't suggest you do, but..) use this instead:
ps aux | grep ssh

Cool
 
Old 08-20-2003, 06:01 PM   #12
breakerfall
Member
 
Registered: Jun 2003
Location: Manchester, UK
Distribution: Gentoo
Posts: 306

Original Poster
Rep: Reputation: 30
Quote:
bash-2.05b$ ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 1324 472 ? S 11:53 0:05 init [3]
root 2 0.0 0.0 0 0 ? SW 11:53 0:00 [migration_CPU0]
root 3 0.0 0.0 0 0 ? SW 11:53 0:00 [keventd]
root 4 0.0 0.0 0 0 ? SWN 11:53 0:02 [ksoftirqd_CPU0]
root 5 0.0 0.0 0 0 ? SW 11:53 0:01 [kswapd]
root 6 0.0 0.0 0 0 ? SW 11:53 0:00 [kscand]
root 7 0.0 0.0 0 0 ? SW 11:53 0:00 [bdflush]
root 8 0.0 0.0 0 0 ? SW 11:53 0:00 [kupdated]
root 9 0.0 0.0 0 0 ? SW 11:53 0:00 [knodemgrd]
root 10 0.0 0.0 0 0 ? SW 11:53 0:00 [khubd]
root 12 0.0 0.0 0 0 ? SW 11:53 0:00 [kreiserfsd]
root 149 0.0 0.1 1680 896 ? S 11:53 0:00 /sbin/devfsd /dev
root 1262 0.0 0.1 1428 564 ? S 11:53 0:00 metalog [MASTER]
root 1264 0.0 0.0 1400 428 ? S 11:53 0:00 metalog [KERNEL]
root 1409 0.0 0.1 1468 644 ? S 11:54 0:00 /usr/sbin/cron
xfs 2267 0.0 0.8 6244 4524 ? S 11:54 0:00 [xfs]
root 2397 0.0 0.0 1356 436 ? S 11:54 0:00 /sbin/dhcpcd eth0
root 2407 0.0 0.0 1304 444 vc/1 S 11:54 0:00 /sbin/agetty 3840
root 2408 0.0 0.0 1304 444 vc/2 S 11:54 0:00 /sbin/agetty 3840
root 2409 0.0 0.0 1304 444 vc/3 S 11:54 0:00 /sbin/agetty 3840
root 2410 0.0 0.0 1304 444 vc/4 S 11:54 0:00 /sbin/agetty 3840
root 2411 0.0 0.0 1304 444 vc/5 S 11:54 0:00 /sbin/agetty 3840
root 2412 0.0 0.0 1304 444 vc/6 S 11:54 0:00 /sbin/agetty 3840
root 2425 0.0 0.1 2428 688 ? S 11:54 0:00 /usr/kde/3.1/bin/
root 2427 1.2 3.4 285940 17812 ? SL 11:54 8:38 /etc/X11/X -auth
root 2428 0.0 0.2 3408 1536 ? S 11:54 0:00 -:0
breaker 2531 0.0 0.1 1988 900 ? S 11:55 0:00 /bin/sh /etc/X11/
breaker 2577 0.0 0.1 2008 968 ? S 11:55 0:00 /bin/sh --login /
breaker 2602 0.0 2.6 26608 13736 ? S 11:55 0:00 kdeinit: Running.
breaker 2605 0.0 2.6 26244 13756 ? S 11:55 0:00 kdeinit: dcopserv
breaker 2608 0.0 2.9 27592 15048 ? S 11:55 0:00 kdeinit: klaunche
breaker 2610 0.0 3.2 28628 16608 ? S 11:55 0:01 kdeinit: kded
breaker 2636 0.0 1.1 9432 5820 ? S 11:55 0:16 //usr/kde/3.1/bin
breaker 2638 0.0 3.6 33280 18980 ? S 11:55 0:00 kdeinit: knotify
breaker 2658 0.0 0.0 1304 308 ? S 11:55 0:00 kwrapper ksmserve
breaker 2660 0.0 3.1 28176 16120 ? S 11:55 0:00 kdeinit: ksmserve
breaker 2661 0.0 3.5 29440 18244 ? S 11:55 0:07 kdeinit: kwin -se
breaker 2663 0.0 4.0 30640 20792 ? S 11:55 0:06 kdeinit: kdesktop
breaker 2665 0.2 4.0 32084 21048 ? S 11:55 2:07 kdeinit: kicker
breaker 2670 0.0 3.1 28164 16068 ? S 11:55 0:00 kdeinit: kaccess
breaker 2672 0.0 3.0 28076 15736 ? S 11:55 0:00 kalarmd --login
breaker 3160 0.0 3.7 30920 19404 ? S 21:38 0:02 kdeinit: konsole
breaker 3161 0.0 0.6 6300 3344 pts/0 S 21:38 0:03 irssi
breaker 3198 0.0 3.5 28804 18172 ? S 21:47 0:00 kdeinit: kio_uise
breaker 3689 1.0 2.3 52048 12156 ? S 22:03 1:11 xmms
breaker 3690 0.0 2.3 52048 12156 ? S 22:03 0:00 xmms
breaker 3691 0.0 2.3 52048 12156 ? S 22:03 0:01 xmms
breaker 3702 0.0 2.3 52048 12156 ? S 22:03 0:00 xmms
breaker 2067 0.1 4.4 32264 22824 ? S 23:01 0:04 kdeinit: konquero
breaker 2075 0.0 2.7 26868 14248 ? S 23:01 0:00 kdeinit: kio_file
breaker 2077 0.0 3.2 28696 16536 ? S 23:02 0:00 kdeinit: kio_thum
breaker 2078 0.0 3.7 29972 19088 ? S 23:02 0:01 konsole --workdir
breaker 2079 0.0 0.2 2264 1340 pts/1 S 23:02 0:00 /bin/bash
root 2082 0.0 0.1 2016 924 pts/1 S 23:02 0:00 [su]
root 2085 0.0 0.2 2264 1292 pts/1 S 23:02 0:00 bash
root 11701 0.0 0.1 1920 736 pts/1 S 23:43 0:00 make
root 11705 0.0 0.1 1924 752 pts/1 S 23:43 0:00 make all-recursiv
root 11708 0.0 0.1 2000 932 pts/1 S 23:43 0:00 /bin/sh -c set fn
root 11712 0.0 0.1 2004 940 pts/1 S 23:43 0:00 /bin/sh -c set fn
root 11713 0.0 0.1 1904 732 pts/1 S 23:43 0:00 make all
root 11714 0.0 0.1 2004 936 pts/1 S 23:43 0:00 /bin/sh -c set fn
breaker 12312 0.0 2.7 26868 14184 ? S 23:43 0:00 kdeinit: kio_file
breaker 13374 0.9 2.0 17020 10340 ? S 23:43 0:05 gaim
root 22667 0.0 0.1 2004 940 pts/1 S 23:48 0:00 /bin/sh -c set fn
root 22668 0.0 0.1 1932 760 pts/1 S 23:48 0:00 make all
root 22669 0.0 0.1 2004 936 pts/1 S 23:48 0:00 /bin/sh -c set fn
breaker 28744 9.9 6.9 56280 35668 ? S 23:50 0:13 /usr/lib/mozilla/
breaker 28765 0.0 6.9 56280 35668 ? S 23:50 0:00 /usr/lib/mozilla/
breaker 28766 0.1 6.9 56280 35668 ? S 23:50 0:00 /usr/lib/mozilla/
breaker 28767 0.0 6.9 56280 35668 ? S 23:50 0:00 /usr/lib/mozilla/
breaker 28768 0.0 6.9 56280 35668 ? S 23:50 0:00 /usr/lib/mozilla/
breaker 30204 0.0 6.9 56280 35668 ? S 23:51 0:00 /usr/lib/mozilla/
root 31806 0.0 0.1 2004 940 pts/1 S 23:52 0:00 /bin/sh -c set fn
root 31807 0.0 0.1 1940 768 pts/1 S 23:52 0:00 make all
breaker 1302 6.7 2.3 52048 12156 ? S 23:52 0:02 xmms
breaker 1303 1.7 2.3 52048 12156 ? S 23:52 0:00 xmms
breaker 1734 3.8 3.7 30888 19356 ? R 23:52 0:00 kdeinit: konsole
breaker 1735 0.0 0.2 2260 1336 pts/2 S 23:52 0:00 /bin/bash
root 1746 0.0 0.1 2052 1000 pts/1 S 23:53 0:00 /bin/sh ../../../
root 1749 0.0 0.3 2596 1564 pts/1 S 23:53 0:00 /bin/sh ../../../
root 1827 0.0 0.3 2596 1564 pts/1 R 23:53 0:00 /bin/sh ../../../
root 1828 0.0 0.0 0 0 pts/1 Z 23:53 0:00 [sh] <defunct>
root 1829 0.0 0.0 1432 464 pts/1 R 23:53 0:00 sed -e 1s/^X// -e
breaker 1830 0.0 0.1 2628 780 pts/2 R 23:53 0:00 ps aux
Also... any ideas as to why it doesn't lemme switch it off? It says shutting down but no [OK] instead showing [!!]


Thanks again
 
Old 08-20-2003, 11:54 PM   #13
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 69
Looks like it's never actually starting, make sure that when you run /etc/init.d/sshd start that /etc/init.d/sshd is actually there, if it's not, you'll need to find out why. If it is there, you'll wanna see what happens (in your logs) right after you start it, because it's dying immediately (or so it would seem).

Cool
 
Old 08-21-2003, 04:57 AM   #14
breakerfall
Member
 
Registered: Jun 2003
Location: Manchester, UK
Distribution: Gentoo
Posts: 306

Original Poster
Rep: Reputation: 30
This is weird. It is there. I run the command and it starts:
Quote:
bash-2.05b# /etc/init.d/sshd start
* Starting sshd... [ ok ]
Then I run the ps aux | grep ssh and see
Quote:
bash-2.05b# ps aux | grep ssh
root 2554 0.0 0.0 1408 432 pts/0 S 10:41 0:00 grep ssh
I still get the connection refused message. And when trying the stop command it, again, shows the stopping messages, which failes as it just shows [!!] instead of [ok]. Which means you're probably correct and it's shutting down instantly.

Any more ideas?
 
Old 08-23-2003, 05:54 PM   #15
breakerfall
Member
 
Registered: Jun 2003
Location: Manchester, UK
Distribution: Gentoo
Posts: 306

Original Poster
Rep: Reputation: 30
Anyone?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Reiserfsck root partition through SSH (Gentoo) Mil0 Linux - General 3 08-09-2005 12:13 PM
Rsyncing between windows client and gentoo server, over ssh, using key for auth. Passive Linux - Networking 0 08-03-2005 11:05 AM
ssh win2k -> linux & run a gtk app albean Linux - Newbie 4 12-08-2004 11:16 AM
how to ssh to Linux server via Win2K proxy wkuk Linux - Networking 2 04-23-2003 05:03 PM
Win2k/mandrake -> win2k [remove linux] wct Linux - General 7 11-23-2002 11:48 PM

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

All times are GMT -5. The time now is 11:20 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