1

I have been trying to figure out why I can't get SSH working using Remmina SSH client. In an Ubuntu 12.10 environment, I can connect with my server from the command line using openssh server, like this:

ssh -i privatekey.pem username@hostIP

Everything is good using this way.

But now I want to connect a remote desktop session to the same server, but I need to connect through an SSH tunnel. Anyway i have xrdp running on the server and I will connect using RDP through an SSH tunnel, I am using Remmina Remote Desktop program to do this. But first i just wanted to use Remmina SSH to make sure that was working. And it doesn't work! Each time I try to connect I get this error:

SSH public key authentication failed: Public key file doesn't exist

The settings in Remmina for SSH are very simple:

host
username
indentity file (privatekey.pem)

Does anyone know why SSH works in the command line but fails to work through Remmina? Is it a bug in Remmina? Or am I missing something?

Thanks!

jeffery_the_wind
  • 255
  • 2
  • 4
  • 9

2 Answers2

1

Seems like you need to specify the public key as well:

https://github.com/FreeRDP/Remmina/issues/92

The "identity file" seems to specify the private key.

Johannes 'fish' Ziemke
  • 1,398
  • 1
  • 12
  • 12
0

I wasn't able to get this to work using Johannes' public key suggestion, but I was able to get Remmina to connect to my remote host by changing the Authentication option to "Public key (automatic)" then starting ssh-agent and adding my private key via ssh-add.

To simplify the command line stuff I added this into my .bashrc :

#
# Start up ssh-agent if it's not running
SSHAGENT=/usr/bin/ssh-agent
SSHAGENTARGS="-s"
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then
  eval `$SSHAGENT $SSHAGENTARGS`
  trap "kill $SSH_AGENT_PID" 0
else
  echo SSH Agent running
fi
#
# Add my private key
if [[ -z `ssh-add -L | grep mykey.pem` ]]; then
       ssh-add ~/.ssh/mykey.pem
fi
markp
  • 1
  • 1
  • where did you put that ".bashrc" file? Also: do you invoke it as Post Command? Pre Command? or Startup program? – Sebastián Vansteenkiste Aug 18 '20 at 20:56
  • You can find more information about .bashrc here: https://unix.stackexchange.com/questions/129143/what-is-the-purpose-of-bashrc-and-how-does-it-work – markp Mar 03 '23 at 13:38