This question is Cygwin-specific.
My intention is to SSH to Linux Debian 9 Stretch server from Windows 10 Pro client.
Steps I have done so far:
Installed Cygwin with OpenSSH package.
Generated private-public pair in Cygwin:
ssh-keygen -t rsa -b 8192Copied the server's public key to Cygwin:
ssh-copy-id user_name@ip_address -p port_numberFirst time connected to the server:
ssh user_name@ip_address -p port_numberIt told me:
The authenticity of host '[ip_address]:port_number ([ip_address]:port_number)' can't be established.... Are you sure you want to continue connecting (yes/no)?
I replied
yes.I defined an alias in Cygwin and got it sourced:
vi .bash_aliasesExactly the same as the first time connection.
I restarted Cygwin.
Now the issue I'm having, is that when I do:
ssh-serverIt always asks me for password to private key. And I don't know why. Because it's encrypted obviously, but how do I get rid of it?:
Enter passphrase for key '/home/user_name/.ssh/id_rsa':
Note: When connecting from my Linux machine, it does not ask for that password. Did I miss a step?
EDIT:
When I start SSH Agent and add the key, I can connect flawlessly:
Start SSH Agent:
eval `ssh-agent -s`Add missing keys to identity:
ssh-add
But this only works for a session, why is it not permanent?