See also my answer to Setting up public key authentication to Linux server from Windows (ppk private key). If you need to append, you can download authorized_keys to the local machine, append it locally and re-upload it back.Īlternatively, you can setup the key from another Windows machine using (my) WinSCP client, with its Install Public Key into Server function. The above is basically, what ssh-copy-id does internally – Except that ssh-copy-id appends the authorized_keys, what plain sftp cannot do. ![]() ![]() An SSH key is really a pair of two keys: one public and one private. ssh-copy-id is a script that uses ssh(1) to log into a remote machine (presumably using a login password, so password authentication should be enabled, unless. Uploading id_rsa.pub to /C:/Users/martin/.ssh/authorized_keys To enable passwordless login via SSH, all you need to do is copy your public key to the remote server. Particularly if you have no key on the server registered yet, you can just upload the id_rsa.pub file as authorized_keys file: $ sftp password: If you want to do that from your local machine, you can do it using sftp. Also note that the location of the file for Administrators is overridden in the default sshd_config file to %ALLUSERSPROFILE%\ssh\administrators_authorized_keys.įor details, see my guide for Setting up SSH public key authentication on Win32-OpenSSH. ssh folder and the authorized_keys are set so that only a respective Windows account have a write access to the folder and the file and the account that runs the server have a read access. Create authorized_keys file in the folder and add your public key to it. ![]() ssh folder in your Windows account profile folder (typically in C:\Users\username\.ssh). I'm aware that you know that, but as there are subtle differences, when doing that on a Windows server, I'll mention it anyway for benefit of other readers. Ssh-copy-id script works only against *nix servers (or servers with *nix emulation), as it internally executes some *nix shell commands on the server (like exec, sh, umask, rm, mkdir, tail, cat, etc).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |