How do I establish an SSH connection with a private/public key pair?
How do I establish an SSH connection with a private/public key pair?
PhotoSync allows you to transfer your photos/videos securely via SSH. If you don't want to enter your password directly or you don't want to enter a password at all you can secure your SSH server with a private/public key authentication.
First, create a private/public key pair to secure your server. On the command line enter ssh-keygen and run through the creation process. Starting with OpenSSH 7.8 for RSA keys there will be a different signature in the key file and PhotoSync will not be able to detect these keys, so it is recommended to use the -m PEM parameter when you create your key pair, so e.g. ssh-keygen -m PEM -t rsa -b 4096 for a 4096 bit RSA key.
Next, secure your SSH server and add you public key (in this example id_rsa.pub) to the ~/.ssh/authorized_keys file on your server.
Now connect your iOS device with iTunes, in iTunes click the icon for your device, then click on File Sharing in the sidebar, select PhotoSync in the Apps list and click Add to add your private key file to PhotoSync. Change to the folder where you created your private/public key pair and select the private key file. Once it is added to the "PhotoSync Documents" it is available in the SSH configuration of the PhotoSync app.
In PhotoSync now enter the Settings, choose Configure > FTP/SFTP and create your SSH connection. Switch SFTP/SSH on, enter your server address and you login and tap on the key to select your private key file. PhotoSync now offers you the file that you added via iTunes. Select it and you're able to connect to your SSH server without entering and storing a password.