Archive for May, 2009

ssh key exchange script

Monday, May 25th, 2009

Maemo pc-connectivity project provides a nice script to exchange ssh keys between two machines (e.g PC and N8×0). A passwordless ssh login is a good idea to speed up development and crucial to some tools like sbrsh. To use the script is very simple:

1. Download its debian package from here and install it

- Or download the script itself from here and copy it to one folder in the path, e.g. /usr/bin or /usr/local/bin.

2. Run the script:

$ ssh-key-exchange -l <local_pc_ip> -r <remote_device_ip> -u <device_user>

Host Address: 192.168.1.1 <local_pc_ip>
Target Address: 192.168.1.2 <remote_device_ip>
Target User: root <device_user>

Adding trusted host to ‘known hosts’…OK!
Exporting identity to remote host…root@192.168.1.2’s password:
OK!
Verifying remote user identity and creating it if necessary (this may take a few minutes)…OK!
Authorizing remote host key…OK!

Done. See /tmp/exchange-ssh-key.log and /tmp/exchange-ssh-key.log.err for detailed information
Please, check if everything is correctly by connect to the remote host via SSH.