Skip to content

Instantly share code, notes, and snippets.

@zed
Created June 11, 2017 19:59
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zed/2c2ea3060ccf9d8e47a12829301d2fa1 to your computer and use it in GitHub Desktop.
Save zed/2c2ea3060ccf9d8e47a12829301d2fa1 to your computer and use it in GitHub Desktop.
Passwordless ssh from iPhone using StaSh for Pythonista for iOS

To generate ssh keys for a passwordless login, type on the phone in StaSh launched in Pythonista for iOS:

$ mkdir $STASH_ROOT/.ssh
$ cd $STASH_ROOT/.ssh
$ ssh-keygen
$ mail -s 'public ssh key' -f id_rsa.pub your_email@example.com

Then on the server, add id_rsa.pub from the e-mail, to be able to ssh from the phone without a password:

server$ cat id_rsa.pub | tee -a ~/.ssh/authorized_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment