Can no longer sftp with authorized key

Can no longer sftp with authorized key

Postby firwareslut » Fri May 11, 2012 9:58 am

After playing around with the NAS yesterday I can no longer access the root account via SFTP.

I had it setup so that I could use FUSE to create an SSHFS connection to my home pc from work using the root account and the authorized key file but it no longer automatically logs in. It keeps asking for a password even though this option is not set in the interface. I can log in automatically from a machine connected on the internal network but not outside the network.

I tried setting a password for root login in the interface but it asks for the old password and keeps telling me it is wrong. I shouldn't need to enter an old password anyway in case I have forgotten it.

I logged into the NAS and did "passwd root" and set a password but the sftp login still won't allow.

Finally, I created an FTP user and I can login with a username/password but I cannot automate the login now because I can't provide an authorized key.

One criticism I have with the interface is that I cannot find any configuration files to try and take care of problems myself. I presume all the settings are loaded in a database somewhere?
firwareslut
Donator VIP
Donator VIP
 
Posts: 202
Joined: Thu Oct 06, 2011 11:53 am

Re: Can no longer sftp with authorized key

Postby Jocko » Fri May 11, 2012 11:51 am

Hi firwareslut,

Perhaps some confusions.

Firts, for safety rules, root login is disabled with the sftp server if you use the sftp port. ((you can't change it because at each boot or when you make changes with user accounts, shares, ftp,... the previous ftp conf file is overwritten).

When you try to login to the sftp server, you can't use rsa keys. Indeed, only password method is available and you must use user accounts set in the passwd file.

Why these settings. Because OpenSSH isn't installed but only dropbear with OpenSSL. Dropbear doesn't manage keys with OpenSSH format but proftpd requires this format. So, I think, except for paranoiac men, disable login with rsa keys is not a serious issue.

For an automate login with root permissions, you don't need use sftp server. You can use directly the ssh server.(see the help page).

About your problem of no longer automatically log in. The SSH server asks a password if your key is rejected (if you selected the option "SSH Access with rsa key" ). By default the passwd for root account is "giveit2me" (see the help page).

So I think you should delete the public key used for this connexion and import again this one. Check also if the permissions are still set 755 for the folder "/".
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Can no longer sftp with authorized key

Postby Jocko » Fri May 11, 2012 12:52 pm

firwareslut wrote:I had it setup so that I could use FUSE to create an SSHFS connection to my home pc from work using the root account and the authorized key file but it no longer automatically logs in. It keeps asking for a password even though this option is not set in the interface. I can log in automatically from a machine connected on the internal network but not outside the network.

Two additional notes :
Firstly, your must open the ssh port in the router of your ISP box but I assume you already did it
Secondly, check if the proxy server of your work place forwards this port. (not sure !)
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France


Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 8 guests