Setting up OpenSSH on the n900 is not a big deal. By principle, it is similar to the configuration of all other OpenSSH servers.
I. Installation
There are several ways to install OpenSSH:
- Download install file and run it and follow the wizard.
- Download deb file and install it.
- Open X-terminal and execute the command:
root
apt-get install openssh-server
approx. You can also install OpenSSH client / server right away, but I had problems configuring it, I didn’t want to accept the key.
Ii. Customization
For server authentication, we will use private / public keys. Opens the Midnight Commander [1], go to the
/ etc / ssh / directory and edit the sshd_config file:
uncommenting the PasswordAuthentication line and changing the value of “yes” to “no”, this prohibits us from logging in to the server using a login / password. This completes the OpenSSH configuration, it remains to generate the keys.
')
Iii. Key generation
To access the server, we need a public and private key. They are generated using the ssh-keygen console program:
root
ssh-keygen -q -t rsa -b 4096 -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
After you will need to enter a passphrase and confirm it. The key generation is complete. It remains to restart the server:
etc/init.d/ssh restart
or if the server was not running:
/etc/init.d/ssh start
Iv. Connecting to a server using PuTTY (Windows
For Windows users, there is an SSH client
PuTTY , so that through it you need to convert the key to OpenSSH, you need to do a few steps to do this:
- Copy the private key (id_rsa) from the ~ / .ssh / directory on the PC in any convenient way
- Install PuTTY
- In the program directory run puttygen.exe
- Click Load
- Select all files for display and open the private key id_rsa copied by us from the phone
- Enter the password if it was previously set
- Click Save private key
- Choose a storage location and save for example with the name private_nokia.ppk
- Launch PuTTY
- In the Session tab in the Host Name field enter the phone's IP address
- In the Windows - Translation tab, we change the Receive data assay to be in which character set: to UTF-8
- In Connection - Data in the field Auto-login username enter root
- In Connection - SSH - Auth clicks Browse ... and select the key we have saved private_nokia.ppk
- Click Open and wait for the connection
V. Conclusion
This ended the configuration of OpenSSH on the Nokia n900. For some, this will seem childish prattle, and some will spend less time taming it.
Footnotes
[1]
Midnight Commander