View previous topic :: View next topic |
Author |
Message |
ws n00b
Joined: 20 Aug 2003 Posts: 13
|
Posted: Thu Jan 22, 2004 8:20 pm Post subject: sshd -- im going insane! |
|
|
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 |
|
|
massimo Veteran
Joined: 22 Jun 2003 Posts: 1226
|
Posted: Thu Jan 22, 2004 8:37 pm Post subject: |
|
|
Try this:
Code: |
Port 22
#PasswordAuthentication no
|
_________________ Hello 911? How are you? |
|
Back to top |
|
|
casper Tux's lil' helper
Joined: 02 Nov 2003 Posts: 110 Location: Philadelphia, USA
|
Posted: Thu Jan 22, 2004 9:36 pm Post subject: |
|
|
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 |
|
|
teknomage1 Veteran
Joined: 05 Aug 2003 Posts: 1239 Location: Los Angeles, CA
|
Posted: Thu Jan 22, 2004 9:46 pm Post subject: |
|
|
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 |
|
|
eNut n00b
Joined: 13 Jun 2003 Posts: 36
|
Posted: Thu Jan 22, 2004 9:50 pm Post subject: |
|
|
Post the output of:
Also you have been restarting sshd after you change the conf right?
Code: | /etc/init.d/sshd restart |
|
|
Back to top |
|
|
ws n00b
Joined: 20 Aug 2003 Posts: 13
|
Posted: Fri Jan 23, 2004 2:17 am Post subject: |
|
|
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 |
|
|
eNut n00b
Joined: 13 Jun 2003 Posts: 36
|
Posted: Fri Jan 23, 2004 4:53 pm Post subject: |
|
|
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 |
|
|
ws n00b
Joined: 20 Aug 2003 Posts: 13
|
Posted: Fri Jan 23, 2004 6:29 pm Post subject: |
|
|
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 |
|
|
eNut n00b
Joined: 13 Jun 2003 Posts: 36
|
Posted: Fri Jan 23, 2004 6:44 pm Post subject: |
|
|
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 |
|
|
ws n00b
Joined: 20 Aug 2003 Posts: 13
|
Posted: Fri Jan 23, 2004 6:52 pm Post subject: |
|
|
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 |
|
|
eNut n00b
Joined: 13 Jun 2003 Posts: 36
|
Posted: Fri Jan 23, 2004 7:31 pm Post subject: |
|
|
Are you running iptables on the machine you can't connect to? If so post the output of
Also, what ssh clients are you using? |
|
Back to top |
|
|
ws n00b
Joined: 20 Aug 2003 Posts: 13
|
Posted: Sat Jan 24, 2004 1:09 am Post subject: |
|
|
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 |
|
|
|