Saving rsa key


Forum: Networking
Topic: Saving rsa key
started by: Divago

Posted by Divago on Sep. 21 2007,13:34
some different problem here
DSL generate rsa key everytime u restart network service
(i use netcardconfig but i know i can also start a script into /etc/init.d )

now, i need DSL to keep same rsa keys (so i can avoid annoying problem to remove row in .ssh/know_hosts before re-entering by ssh everytime i reboot the machine :D )

i tried to backup the directory where rsa key are saved, but this does not work: after reboot, it generate a completely different rsa key

so, how (if possible) can i save the rsa key?

Posted by bigjohn on Sep. 26 2007,13:56
I have also searched the forums, and found no solution that works.
frugal install to a flash hda1
HP 5515 thin client
no GUI - command line only
backed up
Most annoying at every reboot a new set of keys generated.
How does one stop this?
I think I have tried every trick mentioned in the forum archives, but no joy.
DSL 2.4.26 - Current?

Posted by jpeters on Sep. 26 2007,15:39
Did you try copying the keys to $HOME? Then you could copy them back into /etc.
Posted by bigjohn on Sep. 26 2007,19:07
Quote (jpeters @ Sep. 26 2007,11:39)
Did you try copying the keys to $HOME? Then you could copy them back into /etc.

Keep it simple, please. Linux novice here and even more so Debian
There is no $HOME directory
there is a /home/dsl
and a /ramdisk/home/dsl

Are you saying I should copy *key* from /etc/ssh to /home?
Or to /home/dsl?

Then copy back on startup to /etc/ssh before starting ssh in bootlocal.sh?

And, in plain English, what is the difference between ssh and sshd?

Thanks


Sorry to be so thick about this, but from the original message I am not alone!

Posted by curaga on Sep. 26 2007,19:37
sshd is the server, which you run on the machine you wish to log on to remotely
ssh is the client you use when you want to log on to some other machine remotely :)

Posted by jpeters on Sep. 27 2007,05:37
Quote (bigjohn @ Sep. 26 2007,15:07)

Are you saying I should copy *key* from /etc/ssh to /home?
Or to /home/dsl?

Copy keys to your home directory, /home/dsl, which gets saved automatically. ($HOME can be substituted for /home/dsl when writing commands in xterm) I created a folder named /home/dsl/ssh_keys where I put them.  

Quote
Then copy back on startup to /etc/ssh before starting ssh in bootlocal.sh?

yes, if that's where your keys are stored (I'm using ssh, which writes the keys to /etc/ssh.  So my entry in bootlocal.sh is
"cp /home/dsl/ssh_keys/*key*  /etc/ssh/"   *key* copies any filename with the word "key" in it.  You can then place "/etc/init.d/ssh start" in bootlocal.sh, and it will not recopy the keys.

Quote
And, in plain English, what is the difference between ssh and sshd?

sshd is the daemon program for ssh. If you load ssh and type "top" in the terminal, you'll see the process running as "sshd" (What actually loads is /usr/sbin/sshd).

Posted by Divago on Oct. 09 2007,11:12
Quote (jpeters @ Sep. 27 2007,01:37)

Quote (bigjohn @ Sep. 26 2007,15:07)

Copy keys to your home directory, /home/dsl, which gets saved automatically. ($HOME can be substituted for /home/dsl when writing commands in xterm) I created a folder named /home/dsl/ssh_keys where I put them.  

Quote
Then copy back on startup to /etc/ssh before starting ssh in bootlocal.sh?

yes, if that's where your keys are stored (I'm using ssh, which writes the keys to /etc/ssh.  So my entry in bootlocal.sh is
"cp /home/dsl/ssh_keys/*key*  /etc/ssh/"   *key* copies any filename with the word "key" in it.  You can then place "/etc/init.d/ssh start" in bootlocal.sh, and it will not recopy the keys.

this is exactly wht i did
i added also a "rm -fr" to remove authomatically generated key 'cause (dunno why) cp -f does not work

btw it's working fine
ty for help

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.