Add/Append id_rsa.pub to an existing authorized_keys file

Issues and Questions related to running Apache Tomcat on z/OS
Post Reply
jloweDt
Posts: 2
Joined: Wed Apr 24, 2019 9:35 pm

Add/Append id_rsa.pub to an existing authorized_keys file

Post by jloweDt » Thu May 02, 2019 8:39 pm

I am in the process of installing CoZ/SFTP for batch only processing on three mainframe z/OS LPARS. Two test LPARS (TEST1 & TEST2) and one prod LPAR (PROD). For authentication I am using pub/priv keys. Everything is working between TEST1 & PROD LPARS.
I am attempting to add TEST2 to the configuration.
How can I add / append the id_rsa.pub key file on TEST2 to the existing authorized_keys file on PROD?

jloweDt
Posts: 2
Joined: Wed Apr 24, 2019 9:35 pm

Re: Add/Append id_rsa.pub to an existing authorized_keys file

Post by jloweDt » Thu May 02, 2019 11:50 pm

From trial and error the following command appears to have worked:

cat ~/.ssh/id_rsa.pub | ssh userid@xx.xx.xx.xx "cat >> /u/home/userid/.ssh/authorized_keys"

Post Reply