aspose file tools*
The moose likes Linux / UNIX and the fly likes SSH remote log-in without private key Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "SSH remote log-in without private key" Watch "SSH remote log-in without private key" New topic
Author

SSH remote log-in without private key

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9383
    
    2

I used ssh-keygen to generate key value pairs, and uploaded the public key to the remote server to which I would log-on to. Now I moved the private key from the $HOME_FOLDER/.ssh/ to another location. Closed the terminal on my Mac and tried to re-login again. I was assuming that the log-in would fail because the private key is not to be found. But to my surprise it logged in successfully. Why is this?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9383
    
    2

Is the log-in credentials checked every time I make an SSH connection? I'm getting a bit confused here. I deleted the private key id_rsa from my /home/user/.ssh/ folder, but still I'm able to ssh log-in to my remote machine. Why is this?
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9383
    
    2

I got to know why!

http://superuser.com/questions/245635/why-does-rsa-authentication-work-after-deleting-private-key

Did an ssh-add -L and I get to see the key which is added to the ssh agent running on my machine. Now I need to figure that out to not cache it and check for the private key everytime I ssh to my remote machine.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SSH remote log-in without private key