deleted the /root/.ssh folder - what should I do for for recovering the keys

2009-12-22 Thread Mark Ryden
Hello,
  I have a machine on which I deleted the /root/.ssh folder;

now , I generated in the past a key file , with
ssh-keygen -t rsa

I pasted the contents of the public key file into some servers
(authorized_keys2), so I can
ssh to them without being prompted for a password.

Now, I cannot ssh to these mecahines.
Is there anyway I can recover the old keys I had ?
Running ssh-keygen -t rsa does not solve the problem unless I **again**
paste the nre gernerated key into the new machines.

Rgs,
Mark

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: deleted the /root/.ssh folder - what should I do for for recovering the keys

2009-12-22 Thread iarly selbir | ski0s
Afaik, that's not possible, unless you have a backup of your .ssk folder.

Regards,

- -
iarly selbir | ski0s

:wq!


On Tue, Dec 22, 2009 at 9:14 AM, Mark Ryden markr...@gmail.com wrote:

 Hello,
  I have a machine on which I deleted the /root/.ssh folder;

 now , I generated in the past a key file , with
 ssh-keygen -t rsa

 I pasted the contents of the public key file into some servers
 (authorized_keys2), so I can
 ssh to them without being prompted for a password.

 Now, I cannot ssh to these mecahines.
 Is there anyway I can recover the old keys I had ?
 Running ssh-keygen -t rsa does not solve the problem unless I **again**
 paste the nre gernerated key into the new machines.

 Rgs,
 Mark

 --
 fedora-list mailing list
 fedora-list@redhat.com
 To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 Guidelines:
 http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

Re: deleted the /root/.ssh folder - what should I do for for recovering the keys

2009-12-22 Thread Chris Smart
2009/12/22 Mark Ryden markr...@gmail.com:
 Hello,
  I have a machine on which I deleted the /root/.ssh folder;


You might be able to recover them with tools like photorec from the
testdisk package. When you delete something it's not zeroed out, so
unless you write over that part of the disk again the data should be
recoverable.

Failing that, if you have physical access to the box then it shouldn't
be too hard to log in locally and copy over the new keys. If someone
else has root access on the boxes (even via su -) then you could do it
that way too.

-c

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

Re: deleted the /root/.ssh folder - what should I do for for recovering the keys

2009-12-22 Thread Rick Stevens

On 12/22/2009 02:13 PM, Chris Smart wrote:

2009/12/22 Mark Rydenmarkr...@gmail.com:

Hello,
 I have a machine on which I deleted the /root/.ssh folder;



You might be able to recover them with tools like photorec from the
testdisk package. When you delete something it's not zeroed out, so
unless you write over that part of the disk again the data should be
recoverable.

Failing that, if you have physical access to the box then it shouldn't
be too hard to log in locally and copy over the new keys. If someone
else has root access on the boxes (even via su -) then you could do it
that way too.


You must also make sure that the authorized_keys or authorized_keys2
file(s) on the destination machine have 644 (rw-r--r--) or 600
(rw---) permissions or the destination will continue to ask for
passwords.  sshd requires that group and other write attributes be
disabled on those files.

By default, sshd wants ~/.ssh/authorized_keys.  You can change that
in the /etc/ssh/ssd_config file on the destination system, then restart
sshd on the destination.

--
- Rick Stevens, Systems Engineer  ri...@nerd.com -
- AIM/Skype: therps2ICQ: 22643734Yahoo: origrps2 -
--
-Beware of programmers who carry screwdrivers-
--

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines