Page 1 of 1

Add/Append id_rsa.pub to an existing authorized_keys file

Posted: Thu May 02, 2019 8:39 pm
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?

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

Posted: Thu May 02, 2019 11:50 pm
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"