Good morning.
Anyone know of a guide for generating an SSH key file (.pem or .ppk) for allowing FileZilla (file transfer program) to access a remote server with a key file instead of a password?
So far, what I have tried has not worked. I am likely missing a step, but not sure what it is.
rimugú
in reply to matthew - retroedge.tech • • •Generate your key and make sure you save the private (to use by you on the client) and the public (to be used in the server)
I use a private ppk in my sftp client (prefer winscp over filezilla),
(I save the private key without password for my servers)
I am assuming you have access (ssh) to the remote server. I copy the public key as ssh-rsa must be copied into <home>/.ssh/authorized_keys
The authorized_keys file must be something like this:
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAhJz1HtW+s2po/vcPIpcQJKj5rMHCC0v0zagfZ8XlrvpoRn2FK
(putty keygen gives you the option of copy pasting, I prefer to save both public and private to text just in case, but make sure you don't mix EOL).
matthew - retroedge.tech likes this.
matthew - retroedge.tech
in reply to rimugú • • •Thank you. I will give this a try.
So it works very similar to how password-less ssh entry works in that you copy the public key to the authorized_files on the remote server in the user you want to login as.
Makes sense. I'll just have to go through the steps and verify that I can make it happen.
rimugú
in reply to matthew - retroedge.tech • • •matthew - retroedge.tech likes this.
matthew - retroedge.tech
in reply to rimugú • • •Yeah, the Windows client is throwing a wrench in my approach and understanding. I'll give what you suggested a try.
Did you use a Windows tool to generate the private and public key?
Since I don't have password enabled for this user on the remote system, I can't do the equivalent of "ssh-copy-id" on Windows (if that is even something that can be done).
rimugú
in reply to matthew - retroedge.tech • • •In windows it should be just specifying what file contains the private key.
If you don't have a password for the remote system, how are you going to update authorized_keys file ?
matthew - retroedge.tech
in reply to rimugú • • •I can login as root using a different key, then:
"su username -" to get access to that specific user and be able to edit authorized_keys file.
matthew - retroedge.tech
in reply to matthew - retroedge.tech • • •rimugú
in reply to matthew - retroedge.tech • • •matthew - retroedge.tech
in reply to rimugú • • •Debian server on DigitalOcean Cloud. A default is to use a private key to login to root. No passwords for remote entry. No other users, besides root, set up with the default Debian on DigitalOcean.
I set up the additional user with "adduser" with the "--disabled-password" option.
I kind of like it, but do not have a whole lot of experience with "cloud" yet. The default of not using any passwords does seem more secure. Not even the possibility of a brute force password login attack.
matthew - retroedge.tech
in reply to rimugú • • •Thank you for your help and guidance. As a result, I now understand this better and was able to connect from FileZilla on Windows to a Debian server.
Understanding the authorized_keys part was "key".
I had never used PuttyGen on Windows, but it makes sense now that I've done that. Very helpful that it shows the text to put in the remote server account's "authorized_keys" file.
atyh
in reply to matthew - retroedge.tech • • •matthew - retroedge.tech
in reply to atyh • • •matthew - retroedge.tech
in reply to matthew - retroedge.tech • • •