Troubleshooting
Problem
This document describes how to import a private key from the SFTP server to the IBM i.
Resolving The Problem
This document describes how to import a private key from the SFTP server to the IBM i.
In this situation, the SFTP server will send the System i SFTP client their private key. This scenario will work only if the SFTP server side generates the key pair using OpenSSH. If the key pair is generated in a format that cannot be understood, it will not work because the private key cannot be read. You can only convert the public key to a different format (in other words, openssh or SecSh).
You should do the following:
| 1. | Store the private key in the /home/username/.ssh directory. Use the commands below to set the correct permissions on the SSH objects: CALL QP2TERM chmod 700 /home/username/.ssh chmod 600 /home/username/.ssh/id_rsa_username Replace id_rsa_username with the actual private key file name received from the SFTP server. |
| 2. | To connect to the SFTP server using the private key from the SFTP server, issue the following command: sftp -o IdentityFile=/home/username/.ssh/id_rsa_username username@servername |
[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"6.1.0"}]
Historical Number
664321698
Was this topic helpful?
Document Information
Modified date:
18 December 2019
UID
nas8N1010457