I am trying to setup a password less connection from a Linux server to Window server and will be using a script to scp a file without using password.
Linux Server (source)
servername : testlinux
id : testbatch
Windows Server (Target)
servername : testwin
id : testwinlogin
I copied the pub key under the testbatch .ssh2 directory to the windows server and put it there under the C:\Users\testwinlogin\.ssh2 and created the authorization file as well.
I was also do a passwordless ssh connection
But this is going to C:\Users\testbatch when i trype ssh testwin
I want to use ssh testwinlogin@testwin and it should go to C:\Users\testwinlogin. How to make it this way ?
So what's the difference between user "testbatch" and user "testwinlogin" on the target machine? Do they share the same .ssh/authorized_keys file? And, afaik that should be .ssh/, not .ssh2/.
OK sounds like you want the userID to default to testwinlogin on your windws box to do this add the following entries to .ssh/config under testbatch home directory on the linux box (testlinux):