Re: [Hampshire] SSH pain

Top Page

Reply to this message
Author: Simon Capstick
Date:  
To: paul, Hampshire LUG Discussion List
Subject: Re: [Hampshire] SSH pain
Paul Stimpson wrote:
> Hi,
>
> I've been using SSH2 to log into my home server for so long I can't remember exactly what I did to set it up. Yesterday I added a new user to the server and I want then to be able to use SFTP.
>
> I created a new user and generated new new id_rsa and id_rsa.pub files (tried several variants of ssh-keygen -t rsa). I added the username to the AllowUsers directive in /etc/ssh/sshdconfig and copied the id_rsa file over to my laptop and put it in a new user's .ssh directory.
>
> If I try to log in using ssh ip.address.of.machine -p <port> -l username -v using the wrong username it goes through verifying the server's fingerprint then bombs, as expected, and an invalid login attempt is written to /var/log/auth.log. If I try with the correct username it goes through the process, the client offers the key then says which auth methods can continue before trying some more and failing. In this case, nothing gets written to /var/log/auth.log. My existing id_rsa for my own account still works.
>
> I'm sure I've done something silly. I think I regenerated all or most of the keys after the dodgy key panic last year. I would be really grateful for any pointers that might get me closer to the solution.
>
> Thanks,
> Paul.
>


Check the permissions and ownership of the newly copied/created files.
Incorrect permissions will give similar errors to yours.

Simon C.