Score:0

SFTP with FileZilla through SSH tunnel with different public keys

iq flag

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 [email protected]

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

Score:0
gu flag

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.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.