I have done so much of googling on this but just couldn't find the exact answer,there are many threads on this, all of them point to check for file permissions or
$HOME directory which are right in my case, below are the details. Any tips on how to debug or resolve is really appreciated:
username@machine-linux2:~/.ssh$ ls -ld . drwx------ 2 username users 0 Jan 4 23:00 . username@machine-linux2:~/.ssh$ ssh-keygen -t rsa -C "email@example.com" Generating public/private rsa key pair. Enter file in which to save the key (/usr2/username/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: open /usr2/username/.ssh/id_rsa failed: Permission denied. Saving the key failed: /usr2/username/.ssh/id_rsa.
Also on a side note, I am seeing some weird stuff on this machine,echo
$PATH just gives the following, previously it used to lot more of paths, don't know what happened all of a sudden, the environment seems to be messed up:
username@machine:~/.ssh$ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games