1

In Ubuntu 20.04, I type sftp at the command line, and I see there is a -i parameter.

When I try it

sftp user@site.com -i Key.ppk

it acts like maybe the command is not recognized and gives me the syntax, as though I had typed sftp -h.

I have tried keyfiles of both .ppk format, and .pem format. The key is the current directory, and I tried with and without ./ in front of the filename. Even if the key was bad, wouldn't it give some useful error message? I have also tried -i=keyfile, but I don't think that's the proper syntax (it continues to prompt for a password in that case, as though ignoring the -i parameter.

I was able to connect with a different user (to same server) that had password only authentication.

enter image description here

Referencing this similar question:

Ángel Araya
  • 1,542
NealWalters
  • 121
  • 1
  • 9

2 Answers2

1

Per the help message, order matters, the -i flag comes before the destination so it should be

sftp -i key user@domain.tld

Ángel Araya
  • 1,542
0

Apparently the -i must come before the user@server.

sftp -i Key.ppk user@site.com 

Now I'm getting a different error, but at least I can move forward with debugging.

NealWalters
  • 121
  • 1
  • 9