I’m new to Linux. I have a server/vps that disable password log-in and only allow to work with RSA public key.

I just download an iPad app, and trying to connect to my VM, I can’t. It's make sense because I disable the password.

My RSA public key is stored inside my .ssh/ folder in my Mac.


Should I move copy the public key from my Mac and use the same one ? Should I find a way to create a new key on my iPad ?

I used Coda for iPad.

I’m opening to any hints / tips / suggestions regarding this.

  • 3
    This is not a question about Ubuntu. It's a software search for your mobile devices so this isn't the right place to ask. The change you'll get an answer here is very slim. – UTF-8 Sep 28 '16 at 0:39
  • 1
    My VM is Ubuntu, and it's linux related, so I thought it would fit here. – cyb3rZ Sep 28 '16 at 0:40
  • You would need the private key, not the public key, on the device you are connecting from. In that instance, you'd install the private key on your phone to connect from your phone to your server. Sadly, though, this falls into a different problem. Realistically you need support using whatever app you're using as an SSH client. – XtrmJosh Sep 28 '16 at 0:46
  • I used Coda for iPad. – cyb3rZ Sep 28 '16 at 0:47
  • Which VM software are you using? Are you using a NAT configuration for the VM network adapter? Try using a Bridge configuration as the VM will get an IP directly from your router. Also, how many RSA keys did you generate? Are all of them configured to allow logging in to ssh on the VM. I ussualy just have one RSA key and copy it among my devices. – Mike Sep 28 '16 at 2:33

I recommend JuiceSSH if you happen to use an Android phone. It's by far the best SSH client for Android I have seen and supports login via password as well as login via private key authorization.

Using different SSH keys for different devices has the disadvantage that you have to handle different keys but the advantage that should one of the devices get compromised, you can just delete that one corresponding pubic key from the server and don't have to hustle to create a new private key on a different device asap and switch the public keys out. So I'd recommend to use different keys for different devices but that's of course personal choice.

You might not be able to create SSH keys inside an app. In this case, create more keys on your computer and transfer them to your mobile devices. To create them, simply run:

ssh-keygen -t rsa -b 4096 -C "yourEmailAddress@host.com"

To make your server accept connections using different private keys, append the file ~/.ssh/authorized_keys on the server with the public key. The default location for the public key of your first key pair is ~/.ssh/id_rsa.pub on your local machine.

  • Thanks for your tips about multi devices with multi keys. You mentioned transfer them to my devices ? you mean copy the actual file OR copy the strings inside the file, and then maybe email it to myself or something right ? – cyb3rZ Sep 28 '16 at 12:43
  • Apps usually let you choose a file containing the private key or the private key encrypted with your passphrase. But of course it's also possible that the app developer chose to let users paste the private key as text. It depends on the app and I don't know which one you're going to choose. JuiceSSH will let you do either. Choose which one you like more. – UTF-8 Sep 28 '16 at 16:23


  1. Is your VM's IP discoverable from ipad? ( I mean you need to give bridged network for your vm to give access to local network).

  2. Do you have private key string with you?

Then ,

Install iTerminal app in your iPad then add your private key in key management menu , then connect to your VM

Or else you can use any private key authentication supported ssh client app. :)

  • So I can just copy my private key and paste, right ? – cyb3rZ Sep 28 '16 at 12:40
  • yes , thats it. – Jameel Grand Sep 29 '16 at 7:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.