Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Hi, I can't get this to work. I created a public key on the client computer and copied it over to /mnt/HD_a2/home/root/.ssh/authorized_keys ; I set the permissions on this file to rw by root and nothing else...it still doesn't work.
I'm really frustrated. I did a search on this forum and found a thread pertaining to DropBear, but not OpenSSH.
please help!
Thanks,
Richard
Offline
thanks for the reply. I copied it there because i thought that was the right place....? Where should it be...?
I checked the permissions, the files are owned by root and authorized_keys is 600. The directory .ssh is 755.
thanks,
Richard
Offline
rtg20 wrote:
thanks for the reply. I copied it there because i thought that was the right place....? Where should it be...?
In root's home directory, and that's not /mnt/HD_a2/home/root by default, but /home/root.
Permissions of ~/.ssh should be 700.
Offline
thanks for the reply. if as root i do cd and then pwd I get /mnt/HD_a2/home/root and not /home/root ... also in /etc/passwd the dir for root is /mnt/HD_a2/home/root ... so maybe it's just differet on my system...?
anyway, I moved the file like you said and fixed the permissions, and it still doesn't work!
thanks,
Richard
Offline
ok I think I fixed it!
my key is still in /mnt/HD_a2/home/root
not sure exactly what I did...but I was trying to get this to work for an scp script and now it does! Maybe chmod 640 for authorized_keys as in
http://linuxproblem.org/art_9.html
...?
anyway, thanks for the help!
Offline
here is what i did:
1) login with the account, which should have a key
2) ssh-keygen -t dsa -f username.identity
3) create in users home (/home/username): .ssh (chmod 600)
4) cat the public key to authorized_keys (chmod 600)
5) move the key to .ssh
6) restart service (not rellay necessary)
7) open the key in putty-gen, save it as .pkk
Last edited by mastervol (2008-12-24 09:46:17)
Offline
I can also confirm that Fonz's steps worked for me.
I am using two DNS323, one shadows the other using RSYNC.
However I face a problem where the /home/root/.ssh folders that contain the keys disappear after reboot, despite the fact that I had issue store-passwd.sh.
Any ideas?
Offline
/home/root is on the read only part (flash memory), right?
if i am not mistaken, store-passwd.sh does only store the /etc/oasswd and /etc/group file .
Offline
In that case I will just modify the fun_plug.init script to link the key files from /mnt/HD_a2.
Thanks
mastervol wrote:
/home/root is on the read only part (flash memory), right?
if i am not mistaken, store-passwd.sh does only store the /etc/oasswd and /etc/group file .
Offline
since i like to keep everything where it is i am using the following .sh:
can be done with root:
#! /ffp/bin/bash date userid="myuser" myreturn=$(cat /etc/passwd | grep $userid) myreturn1=$(echo $myreturn | cut -f1 -d :) #echo $myreturn1 if [ "$myreturn1" != "$userid" ] then echo userid: $userid not found echo adding user $userid useradd -d /home/$userid -m $userid mkdir /home/$userid/.ssh chmod 700 /home/$userid/.ssh chown $userid /home/$userid/.ssh echo /opt/bin/wakelan -m 12345678 > /home/$userid/wol.stfu chmod 700 /home/$userid/wol.stfu chown $userid /home/$userid/wol.stfu cp createkeys.sh /home/$userid else echo userid: $userid found #TBD checks for existence of authorized_keys exit fi
must be done with "myuser":
#! /ffp/bin/bash userid="myuser" rm $userid.identity.pub rm $userid.identity ssh-keygen -t dsa -f $userid.identity -v -N "" cat $userid.identity.pub > /home/$userid/.ssh/authorized_keys chmod 600 /home/$userid/.ssh/authorized_keys chown $userid /home/$userid/.ssh/authorized_keys
"myuser" hast to login and change the password before it can work.
Last edited by mastervol (2008-12-24 10:04:03)
Offline
ok, i updated the script for the user
the logged in user will be used
#! /ffp/bin/bash # creates a key for the current user in the home directory # although, it won't be used, make sure that a password is set for this user, before trying to login via PKI userid=$(whoami) rm ~/$userid.identity.pub rm ~/$userid.identity ssh-keygen -t dsa -f ~/$userid.identity -v -N "" if [ ! -d ~/.ssh ]; then mkdir ~/.ssh fi cat ~/$userid.identity.pub > ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys
Offline