To get free (no ads) SSH access to an unrooted Android device you can use DroidSSHd. First install the latest APK from here. Then open the DroidSSHd app on your device and enter a password in Preferences, Service and Authentication, Password. After this, hit Start and you should be able to connect to the IP and Port displayed.
Setting up keybased logins
At this point, only SSH will work. SFTP or SCP are not yet working and to copy your SSH key, we will have to live with SSH alone. Assuming your public key file is located at
.ssh/id_rsa.pub, run on your desktop computer:
cat .ssh/id_rsa.pub | ssh -p <PORT> <IP> "cat - > /mnt/sdcard/.key"
The file will not be visible in the Android file manager, but you will be able to select it in the Public Key preference in DroidSSHd. After selecting the key, you should be able to login without a password.
SFTP - Mount the Device's Filesystem
In order to mount the device via Fuse/SSH you have to get SFTP working. The DroidSSHd app currently does not provide the required
sftp-server binary. However you can download it here (local copy, MD5). Next, transfer the binary to the device by running (again on the desktop):
cat /<PATH-TO>/sftp-server | ssh -p <PORT> <IP> "cat - > /data/data/br.com.bott.droidsshd/files/bin/sftp-server"
You will most likely also have to make the file executable, so SSH to your Android device and run
android@android:/mnt/sdcard $ chmod 755 /data/data/br.com.bott.droidsshd/files/bin/sftp-server
Now you should be able to mount the device from your desktop like so:
$ sshfs -p <PORT> <IP>:/ <MOUNTPOINT>
In my case, this was:
sshfs -p 9922 tab.ea:/ fuse/ssh/
You should now be able to copy files from and this location as normal. Enjoy.