sebastien/cuisine — Issue #42: ssh_authorize fails when keyfile does not exist
Author: schacki
Created: 2012-02-07 14:01:10+00:00
State: open

ssh_authorize fails for various reasons, when the keyfile does not exist yet, i.e. the first key is provided:

1. if /home/user/.ssh/authorized_keys file does not exist, it can be assumed that the folder /home/user/.ssh/ does not exist as well. if this folder does not exist, file_write(keyf, key) will fail. thus the folder must be created first.

2. file and folder permissions are not handled correctly/ignored :
/home/user/.ssh/authorized_keys needs to get 600
/home/user/.ssh/ needs to 700