I will not allow the root user to use SSH. I only did that on the very first SSH connection to test that it worked. Then I:
1) removed that SSH public key from the root user
2) Disallowed the root user from SSH in the SSH configuration
3) Added my SSH public key to the user that I created for the purposes of SSH into the opnsense router
The trouble is, for some reason, I can SSH in as the root user using the public key for my SSH access, but it does not work for the other user. I don't know if maybe my logging on as the root user had created some kind of caching that lived on after I removed the key from the root user and placed it on the other user?
On my client device, I have a "~/.ssh/config" file which specifies the HostName, Port, User, IdentityFile, and IdentitiesOnly is set to yes.
The private key is on an Onlykey. When I set up the config file to use the root account, it pops up a message asking for me to touch the onlykey to prove presence, as expected. But simply changing the username to the second account I want to use in opnsense for ssh, it does not ask me to touch the onlykey, the onnlykey does not flash blue LED, and it immediately says permission denied. This makes me think something is a bit messed up on the client side, not on opnsense? But i have no idea why. The ssh key works for sure, because it works when I set up the root account in opnsense for that public key. It is just the other account that refuses to make that work.
Thanks
1) removed that SSH public key from the root user
2) Disallowed the root user from SSH in the SSH configuration
3) Added my SSH public key to the user that I created for the purposes of SSH into the opnsense router
The trouble is, for some reason, I can SSH in as the root user using the public key for my SSH access, but it does not work for the other user. I don't know if maybe my logging on as the root user had created some kind of caching that lived on after I removed the key from the root user and placed it on the other user?
On my client device, I have a "~/.ssh/config" file which specifies the HostName, Port, User, IdentityFile, and IdentitiesOnly is set to yes.
The private key is on an Onlykey. When I set up the config file to use the root account, it pops up a message asking for me to touch the onlykey to prove presence, as expected. But simply changing the username to the second account I want to use in opnsense for ssh, it does not ask me to touch the onlykey, the onnlykey does not flash blue LED, and it immediately says permission denied. This makes me think something is a bit messed up on the client side, not on opnsense? But i have no idea why. The ssh key works for sure, because it works when I set up the root account in opnsense for that public key. It is just the other account that refuses to make that work.
Thanks