📜 ⬆️ ⬇️

Configure OpenSSH server on Nokia n900

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:
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:

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:

  1. Copy the private key (id_rsa) from the ~ / .ssh / directory on the PC in any convenient way
  2. Install PuTTY
  3. In the program directory run puttygen.exe
  4. Click Load
  5. Select all files for display and open the private key id_rsa copied by us from the phone
  6. Enter the password if it was previously set
  7. Click Save private key
  8. Choose a storage location and save for example with the name private_nokia.ppk
  9. Launch PuTTY
  10. In the Session tab in the Host Name field enter the phone's IP address
  11. In the Windows - Translation tab, we change the Receive data assay to be in which character set: to UTF-8
  12. In Connection - Data in the field Auto-login username enter root
  13. In Connection - SSH - Auth clicks Browse ... and select the key we have saved private_nokia.ppk
  14. 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.

[1] Midnight Commander

Source: https://habr.com/ru/post/100203/

All Articles