IBM Support

Converting a Tectia Public Key to OpenSSH Key

Troubleshooting


Problem

This document provides the steps necessary to convert a Tectia public key to an OpenSSH public key.

Resolving The Problem

This document provides the steps necessary to convert a Tectia public key to an OpenSSH public key.

The customer is using SSH Tectia Windows client to connect to the System i SSHD. The customer needs to covert it to OpenSSH format.

This document assumes the following:

oA user profile consisting of eight characters or less has been created to provide SSH access to the System i.
oThe user has completed Steps 1-6 in the Rochester Support Center Knowledgebase document New, Configuring the System i SSHD to Use Public-Key Authentication: Database 'DCF Technotes (IBM i)', View 'Products', Document 'Configuring the System i SSHD Server to Use Public-Key Authentication'.

http://www-912.ibm.com/s_dir/slkbase.NSF/1ac66549a21402188625680b0002037e/e8004f58aa21396d86257645005baf85?OpenDocument

You should sign on to the System i with the user ID created for the SFTP client and do the following:
1.On the OS/400 command line, run the CALL QP2TERM command to enter the PASE environment.
2.Issue the following command:

cd /someuser/directory/.ssh
3.Invoke the ssh-keygen utility to convert the client's public Tectia key to OpenSSH format by issuing the following command:

ssh-keygen -i -f filename.pub > filename.openssh.pub

Change filename.pub to the actual the SFTP client public key file name.
4.Copy the converted filename.openssh.pub file into /home/someuser/.ssh/authorized_keys by issuing the following command:

mv /home/someuser/.ssh/filename.openssh.pub  /home/someuser/.ssh/authorized_keys
5.Change ownership of the authorized_keys file to the SSH user by issuing the following command:

chown someuser /home/someuser/.ssh/authorized_keys  
6.Set permissions on the authorized_keys file by issuing the following command:

chmod 644 /home/someuser/.ssh/authorized_keys
7.Run the command below to verify that the converted key is in the user's authorized_keys file:

cat /home/someuser/.ssh/authorized_keys
8.Use the F3 key to exit the PASE environment.

Important Note: In the examples above, you should replace someuser with the actual name of the SFTP client user ID.

[{"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

626292378

Document Information

Modified date:
18 December 2019

UID

nas8N1011109