I setup SFTP between *nix servers as follows:Generate the Public key on the sending server by running the below command:[user1@server1] $ /usr/local/bin/ssh-keygen -t rsa -b 1024Then copy id_dsa.pub file into the /home/remote_user1/.ssh/authorized_keys file on the remote machine server2. Connect to server2:$ sftp remote_user1@server2I am then prompted to enter the password once to complete the handshake and then for all following SFTP connections it directly connects..But recently another team was able to directly connect to our server without the initial handshake, generally I need to provide the remote_user1's password for handshaking.. So what configuration changes (if any) may have allowed for the handshake to be done without the password..? Any links that could help me better understand the SFTP handshaking process would be very helpful too, as I couldn't find much on this subject.
While setting up SFTP between *nix servers, is the intial handshake optional?
scripting;solaris;sftp
I'm not aware of any such handshaking process in SSH. From the steps you have outlined, however, it seems like you aren't telling SSH to use the key in id_dsa for authentication, which would cause a fallback to password authentication. When you have provided the password, maybe some password or key caching daemon running on the client stores that information and reuses it on subsequent connections?Could that by any chance be what you are seeing?If so, one simply needs to tell SSH to use id_dsa for authentication once the remote server knows about the corresponding public key and that it should be allowed to be used for authentication.OpenSSH's man page says:-i identity_file      Selects a file from which the identity (private key) for RSA or DSA authentication      is read.  The default is ~/.ssh/identity for protocol version 1, and      ~/.ssh/id_rsa and ~/.ssh/id_dsa for protocol version 2. (...)and if Solaris is anything similar, unless you are in ~/.ssh when running ssh-keygen, SSH doesn't know to use ./id_dsa.