Passwordless SSH login with RemoteShell

From MorphOS Library

There are lots of tutorials about this for linux, but not much for MorphOS, even if the process is mostly the same. So when I started doing this, I decided to write down all steps, in case someone else needs to do it in the future. I assume you already have a suitable unix / linux system properly configured. If not, google for some linux tutorial.

While "passwordless login" might sound terribly insecure, it's actually often more secure than traditional passworded login. Oversimplified, you "create a really secure & random password, which you upload to the server". In practice, this is of course quite a bit more complex (and more secure). Of course this can be combined with a password for even more protection.

Also note that MorphOS SDK comes with own SSH, SCP etc. which have their own config file. These instructions are for RemoteShell. Commands in SDK have their own config files, to which you can do the same changes.

Step 1: Set hostname You might want to set your hostname in Settings => Network => Host and DNS

Step 2: Create public & private key pair

SYS:Applications/RemoteShell/Files/ssh-keygen -t rsa

When asked for password, just press enter for none. Enter same password again.

Step 3: Get the public key to server Doesn't matter how you do it. With USB massstorage device:

copy sys:Applications/RemoteShell/Files/conf/id_rsa.pub UMSD0:

Move the USB device to the server.

Step 4: Add key to authorized keys
Mount the USB disk (if not done automatically)
Append the key to your list of authorized keys:

cat /media/disk/id_rsa.pub >> ~/.ssh/authorized_keys

NOTE: Use the path where the disk is mounted.

Step 5: RemoteShell configuration
Preferences => Servers => Add
Alias: Whatever you like
Server: Address of the server
Login: User name (on the server)
Password: Empty (unless you use one)
Port: Whatever the server is using.

When connecting to the server for the first time, RemoteShell asks if you want to continue connecting (as the host isn't yet marked as known). After answering yes, the connection will be done automatically.