0

I'm in PowerShell and I can ssh into the server via:

ssh -i my_rsa user@1.2.3.4

How can I transfer files with this same my_rsa private key? Filezilla doesn't support the key and I've tried to convert it to PEM and PPK but that's not working. Git is not an option. Is there an easy way I can SFTP with this RSA key?

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
Ryan
  • 131
  • 4
  • 2
    Can you use a command named `sftp`? In Linux it uses `ssh` as transport and it supports `-i` in the same way, so if `ssh -i` works then `sftp -i` should also work (unless SFTP is not supported on the server). I don't know Windows though. – Kamil Maciorowski Aug 14 '22 at 16:18
  • What makes you say that FileZilla does not support the key? You have to create a “bookmark”, but it should work just fine. How exactly does it not? – Daniel B Aug 14 '22 at 16:38
  • 1
    SSH and SCP work hand-in-hand. What about using SCP like this `scp -i my_rsa filename.txt user@1.2.3.4:/home/user/`? – Giacomo1968 Aug 14 '22 at 16:51
  • I can see you got answers mentioning `scp`, but your question mentions SFTP; my first comment mentions `sftp`. I think it's easy to get confused. Please see "History, SCP and SFTP" in [this answer of mine](https://superuser.com/a/1733992/432690). In your case Windows may be an additional factor that complicates things (to some degree). – Kamil Maciorowski Aug 14 '22 at 17:38

1 Answers1

0

The command you search for is scp and one example transfer will be:

scp -i my_rsa local_file user@1.2.3.4:

If you need more complex operations like upload more files in different directories you can check sftp command

Romeo Ninov
  • 5,319
  • 5
  • 20
  • 20