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: 4
Joined: Wed Apr 24, 2019 9:35 pm

Add/Append id_rsa.pub to an existing authorized_keys file

Post by jloweDt »

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: 4
Joined: Wed Apr 24, 2019 9:35 pm

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

Post by jloweDt »

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