Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
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?
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
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.
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.
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).
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.
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...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.