LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   sshd doesn`t work (https://www.linuxquestions.org/questions/linux-networking-3/sshd-doesn%60t-work-261214/)

TiCkO 12-01-2004 02:58 AM

sshd doesn`t work
 
hello!

I have a little problem about sshd, but i can`t set it up. i have used slackwafre linux 10.0. And ssh was working with no problem, but now when i try to connect i have this message:
Code:

ticko@tickobox:~$ ssh ticko.heapsoft.com
ssh: connect to host ticko.heapsoft.com port 22: Connection refused

Now what is wrong? how to delete this sshd and install it again? i can`t find some similiar topic about sshd. :confused:

|2ainman 12-01-2004 03:40 AM

Are you hosting the server yourself?
Is it behind a firewall?
Can you access any other services on the server?
When you say that ssh was working w/ no problem do you mean that you could ssh into localhost?
Code:

cat /etc/ssh/sshd_config
and post results plz

TiCkO 12-02-2004 10:32 AM

here is it.

Code:

root@tickobox:/home/ticko# cat /etc/ssh/sshd_config
#      $OpenBSD: sshd_config,v 1.68 2003/12/29 16:39:50 millert Exp $

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

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

# 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,1
#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 yes
#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 yes
#PermitEmptyPasswords no

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

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

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials 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' and 'PermitEmptyPasswords'
#UsePAM no

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

# no default banner path
#Banner /some/path

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

so can now anybody tell me what is wrong.

Svidd 02-06-2006 10:43 AM

I'm having the same problem but I can't even connect on the local machine that sshd is running on.

Darin 02-06-2006 12:30 PM

Quote:

Originally Posted by |2ainman
Are you hosting the server yourself?

Apparently so.
Quote:

Originally Posted by |2ainman
Is it behind a firewall?

Is it? it's possible to set up packet filtering to even block local requests. You mentioned Slackware, did you add in a firewall package or rc.firewall script?
Quote:

Originally Posted by |2ainman
Can you access any other services on the server?

Like ping, http. Does the external name ticko.heapsoft.com resolve to the right machine? does ssh localhost or ssh 127.0.0.1 work?
Quote:

Originally Posted by |2ainman
When you say that ssh was working w/ no problem do you mean that you could ssh into localhost?

see above for localhost and were you getting it to work from offsite to your server via domain name before?
Quote:

Originally Posted by |2ainman
cat /etc/ssh/sshd_config and post results plz

The config file looks like it's just setting most defaults, that's probably not it.

Still some unanswered questions that would help us on the forum figure out what's wrong.

satinet 02-06-2006 04:24 PM

did you regenerate your keys or something.

and are you passing the passphrare automatically using ssh-agent?

you might want to turn 'PAM' authentication to 'no'.

try that... i would regen your keys at both sides. and blank any know keys and known hosts to get back to a blank sheet....

Svidd 02-06-2006 06:02 PM

ok I regenerated the keys all right but it still refused my connection on port 22. To clerify this happens when I try $>ssh localhost so its not due to an external firewall.

and here is something interestinf sshd isint running appenetly... when I try /etc/rc.d/rc.sshd restart I get the message:
sshd: no process killed
and it is not in the process tree when I try ps ax

where are the log files kept because something could be going on I can't see.

satinet 02-07-2006 01:42 AM

so 'ps -ax|grep -i sshd' produces nothing?

hmm sounds like ssh isn't running. Can you ssh out from this box? bearing in mind that sshd doesnt need to be running to make outward connections....

are you sure this service is set to start when the system reboots? I'm not familiar with openbsd, but in Netbsd, you need to put it in the /etc/rc.conf file. (openbsd was a fork from netbsd,btw).

Darin 02-07-2006 11:16 AM

As root:
Code:

/etc/rc.d/rc.sshd start
tail -40 /var/log/messages | grep sshd

would be a good way to find out if/why it isn't starting.

Svidd 02-11-2006 02:31 PM

ps ax |grep -i sshd
produces nothing

I also tried darin's suggestion but either noting prints to the log involving sshd or I'm not doing something right.

I have hit another wall. it just seems that sshd won't run and won't tell me why. Is it possable something got corrupted becuase this happened at the same time the permissions for /dev/null got changed somehow. I don't know what happened there just one day it started complaining about permission problems wih /dev/null. I fixed that (I think/hope) by changing the permissions to world readable/writable.

I don't know how this affects my sshd problem but hopfully there is something I can do to get it working again.

satinet 02-11-2006 03:03 PM

what is the output when you actually start the service??

Svidd 02-11-2006 04:50 PM

no output whatsoever now.
When I wiped the rsa keys and started it it did give me output concerning that. Creating them.
Other then that nothing

satinet 02-11-2006 05:00 PM

i dont know how darwin works. but in hp-ux you have to go into /etc/rc.config.d/ and edit the ssh file so that it says something like sshd=1. otherwise it doesnt start even if you type /sbin/init.d/secsh start (the hp way of doing it). i wonder if there is a similar thing in darwin?

can you show the init script? dunno if there is an /etc/init.d or equivalent...


All times are GMT -5. The time now is 12:04 PM.