Subject: Re: How to set up sshd_config to allow connection via dydns?
To: Alasdair Reed <alasdair@iprimus.com.au>
From: Chavdar Ivanov <ci4ic4@gmail.com>
List: netbsd-users
Date: 06/05/2007 18:38:38
On 05/06/07, Alasdair Reed <alasdair@iprimus.com.au> wrote:
> Hi,
>
> I am want to set up my computer (i386 NetBSD3.0.1) so I can log on via ssh from a remote computer. I have a DHCP address so I have set up ddclient in conjunction with dyndns. this all seem to be ok, pinging my dyndns host address as reported by their 'CheckIP' service  works ok

I have similar setup. There is no problem at all with DynDNS.

You do not say how are you connecting to your ISP. In my case, I am on
cable, I have an SMC Barricade wireless router, on which I have
configured redirection of port 22 to the address I get - via DHCP -
from the router (which in itself gets it's routed IP address from the
cable modem again via DHCP, and which is configured to update my
DynDNS address when rebooted - so I have to reboot it from time to
time when I get mail from DynDNS that my address is expiring).

>
> At the moment trying to log on from a remote computer  using the command
>
> 'ssh -v mydyndnshostaddress'
>
> produces the following result
>
> OpenSSH_3.9 NetBSD_Secure_Shell-20050213, OpenSSL 0.9.7d 17 Mar 2004
> debug1: Reading configuration data /etc/ssh/ssh_config
> debug1: Connecting to mydyndnsaddress[mydyndnsaddress ] port 22.
> debug1: Connection established.
> debug1: identity file /root/.ssh/identity type -1
> debug1: identity file /root/.ssh/id_rsa type -1
> debug1: identity file /root/.ssh/id_dsa type -1
> ssh_exchange_identification: Connection closed by remote host

I got the log, but I don't think it is interesting at all in this case.

>
> /var/log/authlog reports the home machine is listening on port 22
>
> but does not report any attempts to log in via ssh
>
> uncommented lines in etc/ssh/sshd_config are as follows:
>
> Port 22
> Protocol 2,1
> ListenAddress 0.0.0.0
> UsePam yes
>
> Nothing is uncommented in /etc/ssh/ssh_config

I see you are trying to connect as root and there is nothing changed
in sshd_config. By default, we have

PermitRootLogin no

there. This is not your problem, though. Yet.

>
> I have looked at the various man pages and various web pages,I suspect that my config files are set up far to minimally  but seem unable to find a clear answer to this hiccup. Any help will be most gratefully received.
>
> Regards,
>
>
> Alasdair
>
Chavdar Ivanov