Please document the procedure for setting up SFTP with a private key. I've been trying it without luck, and while it seems like some have gotten it to work, there are no actual instructions that I've been able to find.
What key formats are known to work?
If the key is specified by filename, does the filename need a special format?
I'm trying to connect to Fedora36. Key is in OPENSSH format, and the connection always fails.
Thomas Jasxon commented
Setting up SFTP with a private key involves a few steps:
Generate a private/public key pair: If you don't already have a key pair, you can generate one using a tool like ssh-keygen. Make sure to specify the type of key you want to generate. The OpenSSH format should work fine.
Copy the public key to the server: Once you have the public key, you need to copy it to the server you want to connect to. Typically, you can do this using the ssh-copy-id command. For example, if your username on the server is user and the server's IP address is 220.127.116.11, you would run the following command:ssh-copy-id -i /path/to/public/key firstname.lastname@example.org
For more information contact me on https://apkinu.com/jt-whatsapp/. I will do my best to guide you.
Joseph Ervin commented
Actually, I retract my previous comment. I went through the whole process again, and now I'm able to make it work with an rsa key created with all default options from ssh-keygen on my Fedora36 build. Not sure what problem I was having initially.
I generated the key with:
% ssh-keygen -t rsa
which shows the "OPENSSH PRIVATE KEY" text at the start and end of the private key file. I used that to create that into solid explorer and it seems to work just fine. Sorry for the misdirection from my previous comment where I thought the private key needed to be in the older "PEM" format. I must have fat-fingered something somewhere along the way. The OPENSSH private key format works fine.
Joseph Ervin commented
Ok,...I got it to work. Just in case nobody else replies, the trick for me was to create a key on the server side (Fedora36 linux) specifying the PEM key format:
% ssh-keygen -b 2048 -t rsa -m PEM
This resulted in a key that had the format:
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----
This worked. Without the "-m PEM" argument, the default output of Fedora36 ssh-keygen was in openssh format, i.e.
-----BEGIN OPENSSH PRIVATE KEY-----
-----END OPENSSH PRIVATE KEY-----
While Solid Explorer was happy consuming the OPENSSH key, the connection would not work.
I hope this helps others...