Execute Remotely - Secure SSH via private/public keys
SSH (Secure Shell) is the method used by xCute to execure remotely. SSH can be set up with public-private key pairs and a passphrase. With a non empty passphrase it is a methodology that increases security over the traditional login and password method.

There are two possible modes, RSA and DSA. xCute supports both.

Using RSA, you need to store the private key in your mobile and the public key in your server.

Using DSA, you need to store both private and public keys in your mobile and the public key in your server.

xCute will save the private key in the mobile, it will NOT transfer it anywhere else, not even to your iCloud account.

You need to generate at least one pair of private/public keys. You can use this pair across several servers or you could generate one pair per group/project/server.

1 - Generating SSH public/private keys

To generate a pair of keys, you use the traditional ssh-keygen mechanism on any Linux/Unix/MaxOS machine.

First check if you already have a pair of keys:
$ ls ~/.ssh

If you found id_rsa.pub and id_rsa skip this box. If not do the following to create one pair of keys:

$ ssh-keygen -t rsa

ssh-keygen will ask for a destination path, accept with the <return/enter> key.
It will then as you for a passphrase, enter one and and remember it, you will need it in xCute.

Enter file in which to save the key (/Users/yourName/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 

When ssh-keygen exits, it would have generated a pair of key files, a private and a public key:

$ ls -l ~/.ssh
total 24
-rw------- 1 user group 1533 Apr  3 15:03 id_rsa
-rw------- 1 user group  520 Apr  3 15:03 id_rsa.pub


2 - Transfering the public key to your servers

  • Mac OS/Linux/Unix:
    Transfer the public key to your server/s the usual way, for example using scp:
    $ cat ~/.ssh/id_rsa.pub | ssh user@yourServer 'cat >> /home/user/.ssh/authorized_keys'
    
  • Windows:
    Transfer the public key to your server following your SSH server provider instructions.
    For Bitvise SSH Server, check their FAQ


3 - Transfering the private key to your mobile via email

To transfer the private key to your mobile you need to send it to xCute. The simplest way is to do it by email by selecting its contents from where you have generated it:
$ cat .ssh/id_rsa
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,F9D55628E1A68A6D9FCE2152DE72E23D

xqjS15KzZ1esrJ6jSRYDSWRK4yaymvyLlQ4wIC/J5jpaYtzV7QenFPUmSS9hzOez
KxjeBltp/ovQiZxvUpza65cvI9f4S66NLM0JlpDumDZctVNzPqNwrj+wKRBfQeDe
Q2ZO1MAPYeQ5uNaNEjRnbdLk1Ulw6biDI7pWfeZYRyRqs8toG1nhaScnCrIzFVC9
...
QQ06s43uTYQ55NUWqNqev5PsWt/5D0OYSCmwPL7UjI6POKjvxd7+xS0o4SnaUDLA
pJnWh9jm76DLoF4RlR7jSup6PY0LpS5A6zsBHpgTwVGBmSW7XEIZqgyi2TfCyQeR
-----END RSA PRIVATE KEY-----


and then pasteing it in an email that you send to yourself.

4 - Transfering the private key from the email to xCute

You need to select and copy - in your mobil - the contents of the private key you received by e-mail. Do not worry if when selecting it in the email there is extra text before of after the key, xCute will ignore it, just Select All and Copy:
email select all email select all
In xCute, you paste the key to the Import page of either the global settings or host settings. Remember to Save after the Paste.
xcute instructions xcute paste


5 - Using a DSA key pair

The differences when installation DSA key pairs are:
  • At ssh-keygen time, use ssh-keygen -t dsa instead of ssh-keygen -t rsa
  • You need to transfer to xCute both the private and the public keys.
  • When sending the email, paste first the private and then the public, one after the other.
  • When receiving the email in your mobil, select all and paste both together, xCute will know how to separate them if and only if you have paste them in the order indicated above.
    xcute paste