Blog | G5 Cyber Security

Mobile SSH Keys: Secure Copying

TL;DR

Copying private keys to mobile devices is risky. Use strong encryption, avoid direct file transfer, and consider using key agents or hardware security modules for better protection. Regularly review and revoke keys.

Securely Copying SSH Keys to Mobile Devices: A Step-by-Step Guide

  1. Understand the Risks
  • Choose a Secure Transfer Method
  • ssh user@server 'cat /path/to/private_key' > private_key
  • Utilize a secure file transfer protocol like SCP or SFTP. Ensure your connection is encrypted.
  • Encrypt the Private Key
  • openssl aes-256-cbc -in private_key -out encrypted_private_key -k "your_strong_passphrase"
  • Remember this passphrase! You’ll need it to decrypt and use the key.
  • Secure Storage on the Mobile Device
  • Key Agent Considerations
  • Hardware Security Modules (HSMs)
  • Regular Key Rotation
  • Revoke Compromised Keys
  • Device Security Best Practices
  • Exit mobile version