authorized_keys challenge on OMVS under z/OS

89 Views Asked by At

I've done this before but yesterday and today I've had zero luck with getting the ~/.ssh/authorized_keys file to work for a user on my z/OS system.

what I do is:

  1. sftp to z/OS and issue ls /+mode=text
  2. cd .ssh
  3. put id_rsa.pub authorized_keys
  4. quit the sftp session
  5. try ssh to the system and get a prompt for password which I shouldn't.

I've tried

  1. changing permissions to 644 and to 600 without success
  2. tagging as IBM-1047 - no success

I'm sure there is something obvious but I'm not seeing it. This is effectively what I've done on other systems and userids.

2

There are 2 best solutions below

0
Igor Todorovski On BEST ANSWER

Make sure your .ssh directory only has permissions to read/write/execute for the owner:

chmod 700 ~/.ssh 
0
Lionel B Dyck On

The solution was that the ~/.ssh directory had permissions of 777. Why I've no clue. Changed to 700 and all is good.