Questions tagged [ssh-keygen]

17 questions
20
votes
1 answer

Differences between "BEGIN RSA PRIVATE KEY" and "BEGIN OPENSSH PRIVATE KEY"

I'm trying to genereate RSA key to access some git repositories in azure with ssh. Having Ubuntu 22.04 and OpenSSL version OpenSSL 3.0.2 15 Mar 2022, I generate an RSA key like this: $ ssh-keygen -t rsa -b 4096 Generating public/private rsa key…
15
votes
4 answers

Alternative to ssh-copy-id on windows

I want to copy an SSH public key to a remote device on Windows. I'm not using PuTTYgen rather just OpenSSH through PowerShell. I ran ssh-keygen -t rsa And it gave me a public and private key in my .ssh folder but if I try to do ssh-copy-id -i…
7
votes
1 answer

How to check version of ssh-keygen?

What command can be used in Linux to display the version of ssh-keygen? Its man page doesn't tell the version, oddly, nor does it mention any option to do it (e.g. -v or --version). Of no use is apt-cache either, as it shows the version of the whole…
ByteEater
  • 293
5
votes
2 answers

How to generate rsa-sha2-256 keys using ssh-keygen utility?

I want to generate rsa-sha2-256 ssh key pair using ssh-keygen utility. Can you please share the command for the same? For ssh-rsa, it's ssh-keygen -t rsa
3
votes
2 answers

How to convert OpenSSH ED25519 private key to the OpenSSH format that MySQL Workbench uses?

My OpenSSH ED25519 private key file has the following structure: -----BEGIN OPENSSH PRIVATE KEY----- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -----END OPENSSH…
3
votes
1 answer

Suddenly, my ssh requires a password--debug1: send_pubkey_test: no mutual signature algorithm

Went to check something on my Ubuntu server: jlouthan@siege  ~/.ssh  ssh metroplex.theologic.us (theologic.us@metroplex.theologic.us) Password: That is odd because I have ssh keys. Troubleshooting, I generated a new set of RSA keys.…
2
votes
1 answer

Is ssh-keygen -s supposed to work with ssh-agent?

We're converting our ssh host keys to certificate-signed keys. I wanted to write a script that would use ssh-keyscan to grab all the public keys, then sign them all, and then use ansible to push the signed keys back out to all the systems. I do…
2
votes
1 answer

Why does ssh-keygen -K give me a different keyhalf everytime I invoke it?

I'm just getting started using a YubiKey to manage my ssh keypairs. As far as I could gather from existing resources, ed25519-sk with ssh-keygen seems to be the most straightforward way to make that happen. Now I have two questions: Using…
Marco
  • 115
1
vote
0 answers

Does ssh-keygen have a command to change the setting on a public key?

Does ssh-keygen have an option for setting the values like force-command, no-port-forwarding, no-agent-forwarding on a supplied key? I am thinking of the instance, when someone sends you their public key and you want to restrict the commands the key…
vfclists
  • 883
  • 2
  • 11
  • 24
0
votes
1 answer

Is it possible to convert ssh private key from PEM to OpenSSH format without a salt?

Per https://www.reddit.com/r/sysadmin/comments/wf7ri8/comment/iit1rwx/ to convert a private key from PEM to OpenSSH format I need to first make a copy of the file and then run: ssh-keygen -p -f private_key_openssh.pem -N "" The problem is that…
Gili
  • 1,901
0
votes
0 answers

Rsync to Synology NAS with public key does not work as expected

I know that this question is asked a lot, but none of the answers could help me so far. I am trying to copy files via rsync from an ubuntu server to a Synology nas without a password prompt. I am using Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-92-generic…
Jan T.
  • 21
0
votes
0 answers

FileZilla stopped using keys from ssh-agent on macOS

I recently set up SSH access to my web servers on my Mac by following GitHub's documentation for Generating a new SSH key and adding it to the ssh-agent. After that, I installed FileZilla and the connections to my servers worked correctly. However,…
kataba
  • 11
0
votes
0 answers

Why doesn't windows 10 ssh-keygen honor the -m option?

Windows 10 command line ssh-keygen -b 2048 -mPKCS8 doesn't change the .pub file created to PKCS8 (it's always the one-liner). I can do this to get the actual format output to the screen: ssh-keygen -ef test.key -mPKCS8 but if I tell it to use PKCS8…
0
votes
1 answer

ssh-keygen -f option, with PowerShell, continues to say folder not exists despite it does

I'm using the PowerShell terminal in Windows 10. I created a folder "new_folder" in ~/.ssh mkdir ~/.ssh/new_folder Then I try to run ssh-keygen with the -f option. The documentation says "[-f output_keyfile]". Both ssh-keygen -t rsa -b 4096 -f…
Alex 75
  • 113
-1
votes
2 answers

With a key pair at hand, and the private key working, how can I find the "counterpart public key" on the server and compare fingerprints?

I have the fingerprint from the remote host which is said to be its public key fingerprint according to What is a SSH key fingerprint and how is it generated?. Asking for the host fingerprint: ssh-keygen -lf <(ssh-keyscan MY_SERVER.com…
questionto42
  • 2,691
1
2