0

I have setup an SSH tunnel to connect to an AWS transfer server through FileZilla

ssh -i ~/bastion-server.pem -L 3111:vpce-id.eu-west-3.vpce.amazonaws.com:22 ec2-user@x.x.x.x

Which is working fine.

Then in FileZilla I have my connection string

Host: 127.0.0.1 Port:3111 Username:sftpuser key:transfer-server.pem

The FileZilla log says

Status:         Connecting to 127.0.0.1:3111...
Status:         Using username "Username:sftpuser". 
Status:         Authenticating with public key "~/bastion-server.pem" from agent 

Why is FileZilla using bastion-server.pem and how can I make it use transfer-server.pem

Ydrab
  • 11
  • 2

1 Answers1

0

FileZilla is merely using the keys it can find in the ssh-agent.

Try looking at what ssh-add -l says and you'll see why it uses that key. I don't use FileZilla but I expect it looks for standard keys in ~/.ssh/id_{ed25519,rsa} which it cannot find and falls back to the only key available to it.

Either configure the FileZilla entry to specifiy a key or simply use scp (or better yet, rsync if possible) which support specifying keys on the command line.

Ginnungagap
  • 2,595
  • 10
  • 13