[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: SSH through wireless router



Haines Brown wrote:
> Well, this might be useful. When you say that I should try ssh
> localhost, this is what I understand you to mean:
>
>   $ ssh localhost
>   ssh_exchange_identification: Connection closed by remote host
>   

This rules out problems with the network, at least.

> If I understood you correctly, then something's really amiss. So
> configuration might be off. I have a configuration file for both ssh and
> sshd. The ssh.config file has all defaults, except for these lines:
>
>       Host *
>
>       SendEnv LANG LC_*
>       HashKnownHosts yes
>       GSSAPIAuthentication yes
>       GSSAPIDelegateCredentials no
>
> These are some defaults:
>
>   #   ForwardAgent no
>   #   ForwardX11 no
>   #   ForwardX11Trusted yes
>   #   RhostsRSAAuthentication no
>   #   RSAAuthentication yes
>
> One thing strange is:
>
>   #   IdentityFile ~/.ssh/identity
>   #   IdentityFile ~/.ssh/id_rsa
>   #   IdentityFile ~/.ssh/id_dsa
>
> I have no ~/.ssh/ directory.
>
>   
>> and try ssh'ing to port 2222, and watch what sshd says.
>>     
>
> When I did 
>
>   $ /usr/bin/ssh localhost:
>   ssh_exchange_identification: Connection closed by remote host
>
> Same for 
>
>   $ /usr/sbin/sshd localhost:
>   ssh_exchange_identification: Connection closed by remote host
>
> Same for root. 
>
> When I went to sshd to port 2222: 
>
>   $ sudo /usr/sbin/sshd -d -p 2222
>   debug1: sshd version OpenSSH_4.3p2 Debian-9 
>   debug1: read PEM private key done: type RSA
>   debug1: private host key: #0 type 1 RSA
>   debug1: read PEM private key done: type DSA
>   debug1: private host key: #1 type 2 DSA
>   debug1: rexec_argv[0]='/usr/sbin/sshd'
>   debug1: rexec_argv[1]='-d'
>   debug1: rexec_argv[2]='-p'
>   debug1: rexec_argv[3]='2222'
>   debug1: Bind to port 2222 on ::.
>   Server listening on :: port 2222.
>   debug1: Bind to port 2222 on 0.0.0.0.
>
> This seems like it is able to access the port OK. Does this suggest the
> ssh configuration is OK? As for ssh log files, I've yet to find 
> them. There is no explicit ssh(d) log in /var/logs, and nothing
> /etc/ssh/. None of the regular logs report any event, which I find
> peculiar.

With that sshd running in debug mode in port 2222 (or any other), try
also connecting to locahost on port 2222 (ssh -p 2222 localhost) to see
if any helpful messages come out.

-- 
A language that doesn't have everything is actually easier to program
in than some that do.
                -- Dennis M. Ritchie

Eduardo M KALINOWSKI
ekalin@gmail.com
http://move.to/hpkb


Reply to: