You are not logged in.
when i try to connect to my laptop from another computer i get.
ssh: connect to host 192.168.0.178 port 22: Connection refused
lost connection
i already edited the /etc/hosts.allow:
#
# /etc/hosts.allow
#
sshd ALL:ALL
# End of file
i still get the same error.
what could be the problem?
what else can i do?
Last edited by osc~ (2007-12-11 02:57:45)
Offline
I think the line should be : sshd: ALL
Offline
"Connection refused" means that there is nothing listening on that port (22) or the port is blocked with iptables REJECT.
- check that sshd is really running
- any firewall?
Last edited by VikM (2007-12-10 13:54:14)
Offline
did you change the port number in the config? if so, make sure you're adding it to the command. also check to make sure the daemon is in fact running.
Offline
i changed the hosts.allow to
sshd: ALL : ALLOW
i also added sshd in the /etc/rc.conf DAEMONS.
did you change the port number in the config? if so, make sure you're adding it to the command. also check to make sure the daemon is in fact running.
i didnt change any port number.
my /etc/ssh/sshd_config is:
# $OpenBSD: sshd_config,v 1.75 2007/03/19 01:01:29 djm 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
#AddressFamily any
ListenAddress 0.0.0.0
#ListenAddress ::
# Disable legacy (protocol version 1) support in the server for new
# installations. In future the default will change to require explicit
# activation of protocol 1
Protocol 2
# 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
#MaxAuthTries 6
#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 no
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no
# no default banner path
#Banner /some/path
# override default of no subsystems
Subsystem sftp /usr/lib/ssh/sftp-server
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# ForceCommand cvs server
i also typed:
/etc/rc.d/sshd start
:: Starting Secure Shell Daemon [FAIL]
thanks
cheers
Last edited by osc~ (2007-12-10 14:38:38)
Offline
Sshd is not running. Does /var/log/everything/log contain anything about ssh?
What happens if you manually run
/usr/sbin/sshd
Not very elegant, but also try
pacman -S openssh
:: openssh-4.7p1-6: local version is up to date. Upgrade anyway? [Y/n] Y
resolving dependencies... done.
looking for inter-conflicts...
Offline
when i run /usr/sbin/sshd nothing happens.
in /var/log/everything.log there is nothing about ssh
Offline
when i run /usr/sbin/sshd nothing happens.
You mean you don't get any message on console? Or you mean that sshd process is not created? (Check with 'ps x | grep sshd').
Offline
sorry, yeah i dont get any message.
ps x | grep sshd
7660 ? Ss 0:00 /usr/sbin/sshd
9847 pts/0 S+ 0:00 grep sshd
Offline
Well, so since sshd is running (manually), I'd try again to connect to it ("ssh localhost") to see if it accepts connections OK. If it does, but not from outside, then you've got a problem not with sshd, but with some firewall/filter along the way. If it doesn't, then you have a problem with sshd_config; but by the looks of yours it seems OK.
Offline
+1
looks like it's your firewall.
Offline
i dont know how or what i did (i think a combination of everything) but it ended up working.
thanks alot
Offline