pfSense SSH issues

October 12, 2022

Issue # 1 – no key or gen a new key.

Simple, just run ssh-keygen


Output like…

Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
/root/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/
The key fingerprint is:
The key's randomart image is:
+---[RSA 2048]----+
|                 |
|      .   E*oo*+.|

Issue 2 – ssh commands cause error

So, I only have this one but it is a long error so I put it in a sub heading.

Could not open a connection to your authentication agent.

So simplified answer, is ssh needs to know what shell script to send command to. The below code worked for me.

ssh-agent /bin/sh

It will cause the shell to be cleared from [2.6.0-RELEASE][]/root: to

simply, #

This indicates you are in a sh script. At least that is what I understand it to be. Comment below if you know more on this than I. Also, once this is done it appears this sticks and ssh commands work as expected. Such as:

Then, I ran the ssh-add to associate the newly generated key from Issue 1 to ssh so it would use it for connections in the future.

# ssh-add ~/.ssh/id_rsa

Now, this works as I would have expected all along.

[2.6.0-RELEASE][]/root: ssh root@

Leave a Reply

Your email address will not be published. Required fields are marked *