• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SSH remote log-in without private key

 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic