Refactored how SSH connection and data approval is performed