ssh localhost

The terminal app is limited in its rights for good reasons; to get rid of this you must SSH from outside (Wifi, USB) or inside the terminal app SSH to localhost. All this is only posible with RSA key authentication, not with password. Generate a key pair and use it to connect from the terminal to localhost as:

Generate a key pair just for use on the phone itself (without a passphrase):

$ cd ~/.ssh
$ ssh-keygen -t rsa -f localhost_rsa
$ cat >> authorized_keys

Edit ~/.ssh/authorized_keys and add this to the start of the last line:

from="" ssh-rsa AAAA...

Edit or create ~/.ssh/config and add the value for the private key to use:

Host localhost
IdentityFile /home/phablet/.ssh/localhost_rsa

Now you can:

$ ssh localhost

Last updated: Sat Oct 17 15:35:27 CEST 2015