You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: separate SSH key setup commands for better error handling
Split the single complex shell command in SshKeySetupAction::execute into
four focused private methods:
- create_ssh_directory: handles 'mkdir -p ~/.ssh'
- add_public_key_to_authorized_keys: adds public key to authorized_keys file
- set_ssh_directory_permissions: handles 'chmod 700' on SSH directory
- set_authorized_keys_permissions: handles 'chmod 600' on authorized_keys file
This provides better error granularity, making it easier to identify which
specific operation fails during SSH key setup. Each command now executes
individually with its own error handling.
0 commit comments