Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sshd -- im going insane!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ws
n00b
n00b


Joined: 20 Aug 2003
Posts: 13

PostPosted: Thu Jan 22, 2004 8:20 pm    Post subject: sshd -- im going insane! Reply with quote

Ok, well, evidently SSHD is running OK but unfortunatly, im not able to ssh into it. I had my brother in detriot try and ssh into it and probably out of the 100+ times he tried, one time he got to the halfway in before there was a authentication expiration or someting and the rest of the times it will just time out.
My current setup, from numerous random experiments consists of me forwarding port 772 on my router to 22 on my box (due to the recommendation that there might be a problem with my ISP blocking port 22)

Here is a copy of my sshd_config:

Code:

#   $OpenBSD: sshd_config,v 1.65 2003/08/28 12:54:34 markus Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options change a
# default value.

#Port 22
Protocol 2
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
#obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
PermitRootLogin no
#StrictModes yes

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile   .ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
#PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCreds yes

# Set this to 'yes' to enable PAM authentication (via challenge-response)
# and session processing. Depending on your PAM configuration, this may
# bypass the setting of 'PasswordAuthentication'
UsePAM no

#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#KeepAlive yes
#UseLogin yes
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression yes
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10

# no default banner path
Banner /etc/issue

# override default of no subsystems
Subsystem   sftp   /usr/lib/misc/sftp-server


Any suggestions would be greatly appreciated.
Back to top
View user's profile Send private message
massimo
Veteran
Veteran


Joined: 22 Jun 2003
Posts: 1226

PostPosted: Thu Jan 22, 2004 8:37 pm    Post subject: Reply with quote

Try this:
Code:

Port 22
#PasswordAuthentication no

_________________
Hello 911? How are you?
Back to top
View user's profile Send private message
casper
Tux's lil' helper
Tux's lil' helper


Joined: 02 Nov 2003
Posts: 110
Location: Philadelphia, USA

PostPosted: Thu Jan 22, 2004 9:36 pm    Post subject: Reply with quote

Yup. According to your sshd_config it's not listening on anyports.
_________________
fortune men-women:
"To our sweethearts and wives. May they never meet.
-- 19th century toast"
Back to top
View user's profile Send private message
teknomage1
Veteran
Veteran


Joined: 05 Aug 2003
Posts: 1239
Location: Los Angeles, CA

PostPosted: Thu Jan 22, 2004 9:46 pm    Post subject: Reply with quote

uncommenting 'Port 22' won't change anything, but you might try turning off UseDNS and make sure your brother's not trying to login as root. Also check your auth.log to see if it's displaying any errors
Back to top
View user's profile Send private message
eNut
n00b
n00b


Joined: 13 Jun 2003
Posts: 36

PostPosted: Thu Jan 22, 2004 9:50 pm    Post subject: Reply with quote

Post the output of:
Code:
netstat --inet -l


Also you have been restarting sshd after you change the conf right?
Code:
/etc/init.d/sshd restart
Back to top
View user's profile Send private message
ws
n00b
n00b


Joined: 20 Aug 2003
Posts: 13

PostPosted: Fri Jan 23, 2004 2:17 am    Post subject: Reply with quote

Code:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State     
tcp        0      0 *:ssh                   *:*                     LISTEN     
udp        0      0 *:bootpc                *:*                                 


And yes, i've been restarting it. I uncommented that line, just for testing purposes and still no results.
Back to top
View user's profile Send private message
eNut
n00b
n00b


Joined: 13 Jun 2003
Posts: 36

PostPosted: Fri Jan 23, 2004 4:53 pm    Post subject: Reply with quote

I don't know. I would check your logs and make sure nothing is failing. I have never had an install where sshd wouldn't work "out of the box" as it were.

One other thing. Are you running any sort of firewall? Also, could you describe your entire network setup?
Back to top
View user's profile Send private message
ws
n00b
n00b


Joined: 20 Aug 2003
Posts: 13

PostPosted: Fri Jan 23, 2004 6:29 pm    Post subject: Reply with quote

I am going through a router, which i've tried many different configurations considering that may be the possible problem. I've forwarded 22 to 22 on my machine, i've forwarded 722 (based upon recommendation) to 22 on my machine and it still seems silly that it isnt working. The router is running to 2 computers and it is firewalled, but i would have assumed port forwarding would have taken care of it. I guess i may just try to unplug it and go direct and see what happens, that may be a possible option based upon your statement that most of them, if not all, do in fact work out of the box.
Back to top
View user's profile Send private message
eNut
n00b
n00b


Joined: 13 Jun 2003
Posts: 36

PostPosted: Fri Jan 23, 2004 6:44 pm    Post subject: Reply with quote

Before you connect it directly to the net, see if you can ssh into it from the other box on your network. That would isolate the problem to the router if you can connect from the other box on the network.
Back to top
View user's profile Send private message
ws
n00b
n00b


Joined: 20 Aug 2003
Posts: 13

PostPosted: Fri Jan 23, 2004 6:52 pm    Post subject: Reply with quote

The other box on the network can not connect as well. So its either the router, which i just disabled the firewall even, doing something funny or it some other odd thing i have no idea about.
Back to top
View user's profile Send private message
eNut
n00b
n00b


Joined: 13 Jun 2003
Posts: 36

PostPosted: Fri Jan 23, 2004 7:31 pm    Post subject: Reply with quote

Are you running iptables on the machine you can't connect to? If so post the output of
Code:
iptables -L


Also, what ssh clients are you using?
Back to top
View user's profile Send private message
ws
n00b
n00b


Joined: 20 Aug 2003
Posts: 13

PostPosted: Sat Jan 24, 2004 1:09 am    Post subject: Reply with quote

Ok, well, evidently i did something and it magically started working. What it was, i dont know since i tried so many things ;) Thanks for the help, i appreciate it!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum