how to enable remote ssh login on frugalForum: HD Install Topic: how to enable remote ssh login on frugal started by: manishsadh Posted by manishsadh on Feb. 05 2007,03:12
Hi ,i have a frugal install of dsl. i start ssh with boot options but i need to be able to login with ssh remotely over the internet. so far i have done this by issuing "passwd root" and change the root password on the actual pc itself and then login remotely. is there any way i can change the password using a script in .xinitrc so that i can login with ssh without having to first change the password manually on the pc itself. thanks in advance. Posted by ^thehatsrule^ on Feb. 05 2007,03:36
See backup/restore on /etc/passwd and /etc/shadow afaik.
Posted by mikshaw on Feb. 05 2007,04:05
restoring /etc/shadow after setting a root password is sufficient for a ssh connection.
Posted by manishsadh on Feb. 07 2007,01:29
Hi Mikshaw,as advised i included /etc/shadow in the .filetool.lst on my home directory which is on a usb drive. after booting it doesnt seem to restore it automatically. do i have to backup first with backup/ restore? when i attempted bakcup it said /dev/sda1 "invalid device" anyway. i also tried /mnt/sda1 and /dev/sda. my bootoption is home=sda1. do i also need restore=sda1 ? dsl does run the .xinitrc script on the usb where i have comented out dillo. so i dont get dillo on bootup. thanks. Posted by mikshaw on Feb. 07 2007,02:15
You do need to set up a writeable drive before the backup will work. The last time I checked, the syntax was simply "sda1" without the "/dev/" part.As far as I know you don't need to specify a restore partition on the boot line unless you have multiple partitions containing a backup.tar.gz file. DSL should scan the available partitions and choose the first backup.tar.gz it finds. The .xinitrc script is persistent because you also use the home= boot option. This does not have anything to do with the backup/restore process. Posted by manishsadh on Feb. 07 2007,07:56
Hi Mickshaw,i am experiencing something unusual. as advised i did a backup of only the /etc/shadow file by editing .filetool.lst and removing everything in it as i only want /etc/shadow. so the .filetool.lst has only one entry /etc/shadow then i backup onto the usb drive. i get the backup.tar.gz. i check back it has only /etc/shadow when i reboot without the ethernet LAN connection the /etc/shadow is restored on bootup correctly from the backup.tar.gz on the usb drive. but when i connect to the LAN with ethernet and reboot the /etc/shadow goes back to the original and even strange it overwrites the backup.tar.gz on the usb drive with all the original .filetool.lst entries. and as i said earlier i am starting ssh on bootup and need to connect to it remotely. thanks a lot. Posted by mikshaw on Feb. 07 2007,11:40
Well.....coffee is still on its way down the gullet, so I'm not fully understanding your situation, but I'm going to guess that it comes from removing EVERYTHING except /etc/shadow. The backup/restore system itself needs some specific files to remain persistent in order to work. In your case, you will at least need opt/.backup_device Another possible problem is that you might be running with a previous backup that is restoring /home/dsl/.filetool.lst and other files in home, which is overwriting your persistent home files. If this is the case, delete your old backup.tar.gz, make the changes to /home/dsl/.filetool.lst, make sure you have the proper partition specified to backup, and then do the backup. Posted by manishsadh on Feb. 08 2007,02:40
Hi Mikshaw,thanks man, putting etc/shadow and opt/.backup_device did the trick for me. with every little step i am getting more energized to do more. you guys are a great community. i would contribute all i can to this. thanks again. Posted by manishsadh on Feb. 09 2007,01:50
Hi Mikshaw,i need to add something man. to get the password persistence to work i had to add the .filetool.lst and .xfiletool.lst files also besides opt/.backup_device. just some info for you. thanks Posted by mikshaw on Feb. 09 2007,03:04
I'm not sure why, since earlier you said you use "home=sda1". This would remove the need to include anything from /home/dsl in your backup.
|