Before using SFTP with DataMigrator, you need to set up SSH connections without passwords.
For example, if your DataMigrator server is a on a Linux system called local and you want to retrieve or write files on a server called remote, you should log on to your local system with your user ID, for example, user. Then, you need to generate a key file:
/home/user/$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/user/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/user/.ssh/id_rsa. Your public key has been saved in /home/user/.ssh/id_rsa.pub. The key fingerprint is: 10:7d:25:cb:ff:1d:c5:f4:1e:dc:7d:44:20:fd:21:56 home@local /home/user/$
Then, you need to add your user ID to the list of authorized users on the remote server.
Note: When you issue the command to create the remote directory (.ssh), it will fail if it already exists. This is not an issue.
/user/home/$ ftp remote Connected to lnxx64r6 (172.19.23.42). 220 (vsFTPd 2.2.2) Name (remote:user): 331 Please specify the password. Password: password 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> lcd .ssh Local directory now /home/user/.ssh
ftp> mkdir .ssh 257 "/home/user/.ssh" created ftp> cd .ssh 250 Directory successfully changed. ftp> append id_rsa.pub authorized_keys local: id_rsa.pub remote: authorized_keys 227 Entering Passive Mode (172,19,23,42,91,225). 150 Ok to send data. 226 Transfer complete. 223 bytes sent in 4.2e-05 secs (5.2e+03 Kbytes/sec) ftp> quit 221 Goodbye.
You can verify if this worked by using SFTP. You should not get prompted for a password.
/home/user/$ sftp user@remote Connecting to remote... sftp> quit /home/user/$
Your connection is now set up. In the Data Management Console, expand the Adapters folder. Then expand the Configured folder. Right-click Delimited Flat File (or Flat File) and select Add Connection. You can now select SFTP as the transfer protocol.
iWay Software |