SSH from Windows to Redhat
Problem Description :
Automate file transfer from Windows to Redhat via SSH
Resolution :
1. Generate a key pair on the Windows Server that will be sending the file.
a. Open SSH Secure Shell
b. Edit --> Setting --> Keys
c. Generate new key pair without a passphrase
d. Export public key to a file on server
2. Copy public key (.pub) Redhat Server tothe root home .ssh folder
3. Make sure .ssh folder is chmod 700
4. Within .ssh folder on Redhat command line convert ssh-key from ssh2 format to openssh.
ex. ssh-keygen -i -f Osprey.pub > authorized_keys
-file must be named authorized_keys
5. chmod 600 authorized_keys
6. Now go to Windows Server and try to ssh to Redhat server. It should not ask for the root password since it now uses public key authentication
ex. scp2 test.file root@server.gordonstate.edu:/var/dir
Revision Date : 10/26/2015