DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2009-01-24 04:33:41

hectorg
Member
From: Miami, Fl
Registered: 2009-01-24
Posts: 17
Website

ssh connect with public key problem with a non root user

I am able to get the ssh working with the key located in #/home/user1/.ssh/authorized_keys however when I reboot, it removes all the files from /home/user1 and recreates my /home/root also
Is there a way to keep this key file in there even after a reboot?

Alternatively, could I point the entry in the sshd_config file "AuthorizedKeysFile .ssh/authorized_keys" to the public key  file in "/Volume1/anyfolder/.ssh/authenticated_keys" and actually have it work?

I tried the alternative and it didn't work.

Offline

 

#2 2009-01-24 10:11:18

mastervol
Member
Registered: 2008-09-06
Posts: 81

Re: ssh connect with public key problem with a non root user

just adapt your paths in /etc/passwd
remember to do a store-passwd.sh afterwards

create the required paths
e.g.
/mnt/HD_a2/home/ftpsuser

e.g.
ftpsuser:x:1002:1011::/mnt/HD_a2/home/ftpsuser:/ffp/bin/bash


DNS-323     F/W: 1.06  H/W: ??  ffp: 0.5  Drives (normal mode): 1 x 1,5 TB Seagate SATA II ST31500341AS, 1 x 250 GB Western Digital SATA I

Offline

 

#3 2009-01-24 12:08:09

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: ssh connect with public key problem with a non root user

instead of editing /etc/password directly, you should use

Code:

usermod -d /mnt/HD_a2/home/johnny johnny
store-passwd.sh

Offline

 

#4 2009-01-26 04:25:53

hectorg
Member
From: Miami, Fl
Registered: 2009-01-24
Posts: 17
Website

Re: ssh connect with public key problem with a non root user

Thanks for the help! I thought I had tried that before but I guess I hadnt anyway it is working.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB