SSH Daemon Setup

The Three Issues

It took me hours just to be able to connect from my host to my Blackberry Classic because of three issues:

  • I could not figure out the user I needed to specify for the connection
  • I had problems with key negotiation, as Blackberry OS 10 devices use an older OpenSSH version
  • I did not know how to set up the SSH daemon on my Blackberry device the right way

Now here are the solutions.

Starting the SSH Daemon

How to set up the SSH daemon is even written in an older Blackberry project by sw7ft himself. He may have forgotten it while being busy achieving value for humankind.

Source

We will utilize his second approach, as it’s foolproof, worked out of the box, and the first one did not work for me. So why not let him talk?

Step-by-Step Process

  1. First run:
sshd -Dd
  1. Then do it again after it generates the private RSA key:
sshd -Dd
  1. Generate a RSA 2048 key on your client (the device you are planning to ssh from):
ssh-keygen -t rsa -b 2048 -C "your_email@example.com"

Note: I have trouble using a Mac M1 laptop, the key doesn’t work so I am using a Linux VM.

  1. Copy that key and inside your Blackberry, when you first start term49 (term48):
vi .ssh/authorized_keys

Now paste the generated key into that file.

  1. Start the sshd server (I close the app and reopen it before running this):
sshd -Dd

Done!