LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-27-2004, 02:07 PM   #1
plan9
Member
 
Registered: May 2004
Location: USA
Distribution: Slackware-Current
Posts: 74

Rep: Reputation: 15
trouble ssh-ing to my slackware box


Hello all,

I just installed slackware 9.1 and did all of the updates. I can't seem to ssh into it though- i get
a connection time out message. i've tried stopping and restarting sshd, with no luck. I am able to access the internet np and I can ssh into other servers, but have no access to mine. Can anyone give me a suggestion on how to fix this, or where to begin to look?

thank,

plan9 (as in the movie, not the os!)
 
Old 05-27-2004, 02:20 PM   #2
AUSanders79
Member
 
Registered: Aug 2003
Location: Alabama
Distribution: Slack 10.1/FreeBSD 5.4
Posts: 37

Rep: Reputation: 15
Well what's your current network setup? Where are you trying to SSH FROM? Is it from a machine that is on your LAN or off site somewhere? Routers? Firewalls? Once we get a little more info, might can help further. Also, check made sure sshd is running. You could do a netstat and see if port 22 is listening. That may be your problem too. Let us know....
 
Old 05-27-2004, 03:42 PM   #3
SBing
Member
 
Registered: Mar 2004
Posts: 519

Rep: Reputation: 35
just to furher what AUSanders79 was saying, home networking can be a nightmare due to firewalls getting in the way. Check if ssh is working locally by:

$ netstat -l

you should see:

tcp 0 0 *:ssh *:* LISTEN

then ssh from the machine to itself

$ ssh localhost

if both of the above are working fine, then the problem is between the two machines.

Steve

Edit: You might want to read this great piece by shilo about getting ssh to work, it may help :)

Last edited by SBing; 05-27-2004 at 04:46 PM.
 
Old 05-28-2004, 12:03 AM   #4
SuSE_fan
LQ Newbie
 
Registered: Apr 2004
Location: Provo, Utah, USA
Distribution: SuSE 9.0 Professional
Posts: 19

Rep: Reputation: 0
Can't ssh to server

Hi there,

I can ssh to localhost but, can't ssh to it from any machine on the network.

Tried >> netstat -l and had

tcp 0 0 *.ssh *:* LISTEN

...

ANY HELP????????????
 
Old 05-28-2004, 04:12 AM   #5
SBing
Member
 
Registered: Mar 2004
Posts: 519

Rep: Reputation: 35
Have you killed any firewalls at both ends? Maybe you've blocked some local network traffic. Disconnect from the internet if you don't feel save (but obviously don't disconnect from the network - I assume you're on a router of some sort), then retry with all firewalls down.

How about port forwarding 22 and getting a friend to ssh to your box?

Steve
 
Old 05-28-2004, 08:37 AM   #6
skog
Member
 
Registered: Sep 2003
Location: TX
Distribution: slackware
Posts: 301

Rep: Reputation: 30
you may need to add the other machines to your /etc/hosts.allow its probably inetd getting in the way.
 
Old 05-28-2004, 12:09 PM   #7
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
What is the output of:

iptables -L

?
 
Old 05-31-2004, 06:57 PM   #8
plan9
Member
 
Registered: May 2004
Location: USA
Distribution: Slackware-Current
Posts: 74

Original Poster
Rep: Reputation: 15
Thanks to all the responses, it was in fact a firewall issue.
 
Old 06-01-2004, 02:46 AM   #9
SBing
Member
 
Registered: Mar 2004
Posts: 519

Rep: Reputation: 35
Glad you got it resolved, at which end was the firwewall? On the server or on your main machine?

Steve
 
Old 06-02-2004, 08:43 PM   #10
plan9
Member
 
Registered: May 2004
Location: USA
Distribution: Slackware-Current
Posts: 74

Original Poster
Rep: Reputation: 15
It was on my end, my rc.firewall script was blocking all incomming connections, where i thought that
it was allowing incomming ssh ones.

9
 
Old 10-06-2004, 05:54 AM   #11
NipSo
LQ Newbie
 
Registered: Mar 2004
Posts: 10

Rep: Reputation: 0
well I kinda have the same question

I'm trying to set up my ssh, I followed the steps from silho and everything works on LAN, but it doesn't if anyone from outside my local network tries to connect ...

I thought it was the firewall in my router but port 22 is forwarded for that PC so this should work fine

same as port 80
I'm running the noip software so when I let people connect to username.no-ip.org they DO have access to any website in my htdocs dir
but this doesn't work with ssh anymore, cuz it worked before I reinstalled slack (on 10.0 now ;-) )

Quote:
you may need to add the other machines to your /etc/hosts.allow its probably inetd getting in the way.
I've taken a look at this file, and it's empty, some comment here and there but nothing that's not commented...

any help would be appreciated ;-)
 
Old 10-06-2004, 08:24 AM   #12
skog
Member
 
Registered: Sep 2003
Location: TX
Distribution: slackware
Posts: 301

Rep: Reputation: 30
first off go to /etc/syslog.conf and add this line

*.* /dev/tty6

then at the command prompt type this command as root
/etc/rc.d/rc.syslog restart

now hit <CTRL>+<F6> now you can watch all your logs on tty6 when you log in it with ssh or ftp or http or everything this will tell you what is happening. If its inet.d getting in the way you will see some logs about tcp wrappers and a rejected login. If its iptables just look for iptable logs going to port 22.

Last edited by skog; 10-06-2004 at 08:26 AM.
 
Old 10-06-2004, 03:38 PM   #13
NipSo
LQ Newbie
 
Registered: Mar 2004
Posts: 10

Rep: Reputation: 0
ok, this lot is not cool ...

@ local when I have logged in: it say accepted password for blablabla

when I let a user log in from the internet, it says thesame thing BUT putty always gives them: programm causes internal error
every time, with each and every one of them ...
stil nowherez

I do see that it shows:

Accepted password for "username" from "ip" port "different from 22" ssh2

well ssh2 is a setting in my (hardware) router but I don't understand why it shows a different port then 22?

Last edited by NipSo; 10-06-2004 at 05:02 PM.
 
Old 10-07-2004, 09:52 AM   #14
NipSo
LQ Newbie
 
Registered: Mar 2004
Posts: 10

Rep: Reputation: 0
I edited my hosts.allow file to accept
ALL: ALL

didn't do anything

editing it like this:
22: ALL

gives me the following error when somebody tries to connect
Quote:
reverse mapping checking getaddrinfo for kn failed - POSSIBLE BREAKIN ATTEMPT!
 
Old 10-07-2004, 10:10 AM   #15
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
I think the prob come from your router config, it is normal that client use other port than 22 from their side, but will connect on 22 in your side (same behaviour with ftp, http...)

Have you a ' nat list ' command or similar in your router to see if output connection request on port 22 is forwarded to your machine ?

Last edited by Cedrik; 10-07-2004 at 10:12 AM.
 
  


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
Understanding SSH (Sun box to Linux box) oswald21 Linux - Newbie 2 07-08-2006 02:06 PM
SSH-ing to computer behind router ar1 Linux - Networking 1 01-09-2005 10:15 PM
can't ssh into my own slackware 9.1 box, please help plan9 Linux - Networking 2 05-31-2004 06:58 PM
Hav ing problems with slackware 9.1 sound configuration for IBM Thinkpad 600E ic3 Slackware 1 11-16-2003 04:04 PM
try ing to install slackware amazing.pinhead Slackware 1 06-23-2003 02:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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