Setting up an OpenSSH server on Nokia n900
I. Installation
There are several ways to install OpenSSH:
- Download the install file and run it and follow the wizard.
- Download deb file and install it
- Open X-terminal and run the command:
root
apt-get install openssh-server
approx. You can also immediately install OpenSSH client / server, but I had problems setting it up, I didn’t want to accept the key.
II. Customization
For authentication on the server we will use private / public keys. Opens Midnight Commander [1], go to the / etc / ssh / directory and edit the sshd_config file:
uncomment the PasswordAuthentication line and change the value “yes” to “no”, this prevents us from entering the server using the username / password. On this, the OpenSSH configuration is over, it remains to generate the keys.
III. Key generation
To enter the server we need a public and private key. They are generated using the ssh-keygen console program: After that, you will need to enter a passphrase and confirm it. This completes the key generation. It remains to restart the server: or if the server was not started:
root
ssh-keygen -q -t rsa -b 4096 -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keysetc/init.d/ssh restart/etc/init.d/ssh startIV. Connecting to a server using PuTTY (Windows
For Windows users, there is a PuTTY SSH client , in order to connect to OpenSSH through it, you need to convert the key, for this you need to take several steps:
- Copy the private key (id_rsa) from the ~ / .ssh / directory to the PC in any convenient way
- Install PuTTY
- In the directory with the program run puttygen.exe
- Click Load
- We select all files to display and open the id_rsa private key we copied from the phone
- Enter the password if one was installed earlier
- Click Save private key
- We select the 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 IP address of the phone
- In the Windows tab - Translation, change Receive data assumned to be in which character set: to UTF-8
- In Connection - Data, enter root in the Auto-login username field
- In Connection - SSH - Auth clicks Browse ... and select the private_nokia.ppk key we saved
- Click Open and wait for the connection.
V. Conclusion
This ended the setup of OpenSSH on the Nokia n900. For some, this will sound like babble, and some will spend less time taming it.
Footnotes
[1] Midnight Commander