2022 Developer Survey is open! Take survey.

Questions tagged [ssh-keygen]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
27 views

Is there a way to repair SSH On GCP VM after shielded VM failure

I have a GCP VM on which is installed a Docker with Drupal. e2-medium with SSD 10Go After increasing the disk size to 20GB, I can no longer access the VM in SSH. My VM was failing to boot because of a ...
user avatar
1 vote
1 answer
102 views

I used ssh-keyscan in production environment. is it possible to revert back?

I used ssh-keyscan in production environment, after got to know it may allows MITM. I check in known_hosts files, fingerprint is not there. where can i check or is there any option?
user avatar
  • 11
0 votes
1 answer
202 views

SSH Key Fingerprint Changes

So I copied an SSH private key from my Linux machine to my M1 Mac. (I've attempted to do this both by uploading the cyphertext to a secrets manager as well as directly transfering the file) but when ...
user avatar
  • 151
0 votes
1 answer
37 views

If I setup a 'Passwordless SSH connection' as root user, will it be applied to all other users on the server?

I'm new to the concept of SSH & password-less authentication. I'm trying to setup password-less SSH connection between two servers A & B, using SSH-keygen. If I generate the keys on "...
user avatar
  • 1
0 votes
1 answer
3k views

No such file or directory when trying to create .ssh keys

When I attempt to create ssh keys on my Debian instance : ssh-keygen -f /home/serverkeys/.ssh/id_rsa I am getting the error : Saving key "/home/serverkeys/.ssh/id_rsa" failed: No such file ...
user avatar
  • 113
0 votes
0 answers
371 views

ssh-copy-id does not update authorized_keys file

I can't configure ssh key on my Synology NAS. File ~/.ssh/authorized_keys is not created or not updated. On remote machine (NAS): $ cd $ chmod 700 . $ chmod 700 .ssh $ touch .ssh/authorized_keys $ ...
user avatar
  • 163
0 votes
1 answer
28 views

DigitalOcean Droplet ssh to use a named key

It's been a while since I've done this and configured ssh keys. I generated an ssh key with a different file name than id_rsa I have a DigitalOcean Droplet where I placed a named ssh key pair on ...
user avatar
0 votes
3 answers
314 views

SSH asks for password even after i copied the public key to the remote machines

Hopefully, someone can help me resolve this nightmare. I did a project on vagrant provisioning 4 ubuntu machines, 1 controller and 3 servers. Created SSH key on controller and ssh-copy-id command to 3 ...
user avatar
0 votes
0 answers
423 views

Disabling certain OpenSSH keys on OpenBSD: why the corresponding 'sshd_config' entries are ignored and why 'ssh-keygen -A' generates forbidden keys?

I am trying to achieve the followings on my OpenBSD 6.9 servers: Forbidding the use of all keys but the ssh-ed25519 one on both SERVER and CLIENT sides. Limiting ssh-keygen -A to generate keys only ...
user avatar
  • 11
0 votes
1 answer
56 views

duplicity SSH-RSA key fingerprint of format 102:

When I try to run duplicity between two Ubuntu servers, a message is displayed: "The authenticity of host ...... can't be established. SSH-RSA key fingerprint is 102:...:...:...:...:......." ...
user avatar
0 votes
1 answer
457 views

Can not connect to a Google Cloud TPU using ssh (putty) in Windows

I have a google v3-8 TPU, i can't figure out how to connect to it using ssh in windows. I did every guide there is, but the connection just times out. What i tried (among others): 1. Dos command line: ...
user avatar
0 votes
2 answers
206 views

how to generate a small RSA key

I want to ssh-keygen -t rsa -b 512 but my linux is too "up to date" to allow this. Is there anyway to modify the settings to: generate a 512bit key let me authenticate to the server with ...
user avatar
  • 111
0 votes
0 answers
55 views

SSH connection strange behavior

I am using windows10 and I can connect to my server(Ubuntu 18.04) with PowerShell and Putty. but not with the other two ssh client I have (MobaXtrem,Bitvise). but when i turn on my VPN(SeedVpn) on ...
user avatar
3 votes
1 answer
3k views

Adding ssh keys to a new server without having previously set up users on that server

I've setup a clean new VPS running Ubuntu 20.04 LTS with Hetzner and would like to access it via ssh. Here is what I've tried to do: I have added my public ssh key (passphrase-less) in Hetzner's ...
user avatar
  • 145
1 vote
0 answers
76 views

Remove BOTH ssh key for IP and ssh key for FQDN from known_hosts

Is it possible to remove an ssh key from known_hosts both for the IP and for the FQDN of a machine, knowing only one of the 2? For example, I am on machine A, and I want to remove the public ssh key ...
user avatar
0 votes
2 answers
2k views

Generating ssh-keys not creating key in PKCS1 format

I am attempting to create a public/private key pair using ssh-keygen. I need the key to be in PKCS1 format so that it states "BEING RSA PRIVATE KEY". No matter what I try it appears to only ...
user avatar
  • 179
0 votes
1 answer
697 views

Reconnect automatically to a disconnected ssh session [closed]

I am new to this community , I am working on my iot project in which my microcontroller is working as a server, taking data and executing request. My client is end device (mobile,tablet) and I am ...
user avatar
-1 votes
1 answer
281 views

How to uninstall ssh-keygen utility safely? [duplicate]

I am being tasked to remove ssh-keygen from Ubuntu servers and I don't want to break the computer. Can you please help, how to uninstall ssh-keygen utility safely? Thanks
user avatar
  • 3
1 vote
1 answer
2k views

Adding a ssh host key for a server name to `known_hosts` idempotently?

ssh-keygen -R $HOSTNAME can remove the ssh host key(s) from one's known_hosts. Can I add a specific host key (for a hostname/ip) to a known_hosts in an idempotent way? I want to script ssh'ing into a ...
user avatar
  • 29.9k
0 votes
1 answer
84 views

Why can't I authenticate my SSH connection?

I'm writing a bit confused because I've tried everything. Let me know if I'm missing any critical information for you to help me. I'm trying to SSH into my Cyberpower PDU (device probably not ...
user avatar
  • 1
7 votes
2 answers
2k views

Ubuntu 20.04 ssh-keygen unknown option -G unable to generate Diffie-Hellman parameters

I have noticed that the ssh-keygen for ubuntu 20.04 is missing the options for generating the Diffie-Hellman parameters. This is normally part of SSH hardening. Does anyone know why it has ...
user avatar
  • 131
1 vote
1 answer
138 views

Using 2 key pairs simultaneously for ssh authentication

I have a ssh server running on a raspberry pi. This ssh server can only be accessed by 1 user on my ubuntu laptop only. I have created 2 pairs of ssh keys using: ssh-keygen -t ed25519 -o -a 100 ssh-...
user avatar
  • 121
1 vote
1 answer
616 views

Is it okay to use same SSH keypair for different servers, and how not to?

Initially i tried (and failed) to generate a new SSH keypair for a new server. By default it offers to save it into ~/.ssh/id_rsa, which obviously i couldn't, so as to not overwrite my existing key. ...
user avatar
1 vote
2 answers
2k views

EC2: how to download the private key file for a user

I'm only working with terminal in order to create a user on a linux machine (ec2). When creating a new user and then generating an ssh key for this user ssh-keygen -f rsa I do this I then get a rsa....
user avatar
  • 143
0 votes
1 answer
135 views

How to adequately add identical public-private ssh key to a new client machine?

I have generated private and public key pair files (id_rsa, id_rsa.pub) using ssh-keygen command in a machine A, which is a client. I have tested my connection to server in machine A and it is working ...
user avatar
1 vote
0 answers
3k views

SSH authentication Permission denied (publickey,gssapi-keyex,gssapi-with-mic)

I'm having problem when I try to connect to a remote server using ssh with the following command: ssh -vvv -l user hostname -p XXXX I get the following result: OpenSSH_7.9p1 Debian-10+deb10u1, ...
user avatar
2 votes
2 answers
267 views

how to create status of REMOTE HOST IDENTIFICATION HAS CHANGED when performing ssh to remote machine for testing

We want to cause the status from a remote Linux machine to return "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r", "@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\r", "@@@...
user avatar
  • 451
2 votes
3 answers
5k views

What can someone do with your SSH Private Key? [closed]

What exactly can someone do with my Private Key after they used my laptop to create a SSH Public Key? After reading a few websites, it looks like they can access a server pretending they are me when ...
user avatar
  • 21
1 vote
1 answer
2k views

OpenSSH Windows Server 2016

I am trying to install OpenSSH on a windows server machine. When i use this command: Get-WindowsCapability -Online | ? Name -like 'OpenSSH* I don't get this output: Name : OpenSSH.Client~~~~0.0.1....
user avatar
2 votes
3 answers
357 views

Differing ssh host key in Container-Optimized OS instance

I created a Container-Optimized OS instance in the Google Cloud. When I try to connect to it via ssh from outside the ssh host key fingerprint shown differs from the output of ssh-keygen -lf /etc/ssh/...
user avatar
2 votes
1 answer
69 views

How to setup ssh for a couple of servers?

I'm pretty confused about how ssh really works, and I have already asked a couple of questions related to this, but I suspect I'm going in the XY-problem trap. So, what I want is this. I want to be ...
user avatar
  • 157
1 vote
1 answer
628 views

How to fetch ssh keys from servers?

I need to login to a host via ssh, get a keyfile, close the connection and then use the key to login without password on several machines. The underlying problem is that I need to perform tests on a ...
user avatar
  • 157
1 vote
0 answers
157 views

ssh key revocation list and -z version number

I've been reading about setting up an ssh certificate authority and controlling access via key revocation lists. And in the man page, it lists a -z option for specifying a version number for a key ...
user avatar
  • 143
5 votes
2 answers
6k views

How to verify the private key I have matches AWS keypair?

My AWS instance says it is configured to use the only keypair I have on my account and it has a fingerprint in the format of: 3c:64:a7:85:53:3f:81:1c:24:5a:d2:6a:5b:76:47:da:f3:14:63:88 I have a ...
user avatar
3 votes
1 answer
405 views

Several ed25519 keys with the same prefix

I have created a bunch of ed25519 keys through ssh-keygen to connect to different machines I have access to. However, I noticed that all of them begin with the same, rather long prefix: ...
user avatar
  • 133
0 votes
1 answer
1k views

find ssh2 key fingerprint

How do I find the ssh fingerprint of a ssh2 key ? With a ssh-1 key I can do ssh-keygen -lf /path/to/keyfile. However when I convert the same key to a ssh2 key using ssh-keygen -e -f keyfile.pub > ...
user avatar
  • 101
0 votes
0 answers
81 views

SSH copy key from Raspberry Pi to Linux

I am trying to create a new ssh key, and copy it to a server, using a previously generated ssh key. /usr/bin/ssh-copy-id -f -i /home/pi/.ssh/newKey -o "IdentityFile=/home/pi/bob" user@host.edu The ...
user avatar
  • 133
0 votes
3 answers
226 views

How to have single ssh public-private key pair for a user across different servers?

I am working on standardizing different bits in our environment and as part of that would like to move towards ssh key based authentication. Currently we have individual accounts in each servers (...
user avatar
0 votes
1 answer
1k views

Why is the same private key file generating two different public key strings?

I have an ssh key pair that was generated to use as an access key for my GoCD CI/CD server. It was working but due to some configuration changes I made (moved the server out of container to a Linux ...
user avatar
0 votes
2 answers
204 views

Is SSH-KEYGEN secure, even when client machine gets hack?

Suppose there is Client - Server machine. On the Client machine, we have generated an SSH-KEYGEN and stored the same key on Server Machine. Which means, when Client connects Server using SSH, it won't ...
user avatar
0 votes
1 answer
570 views

my ssh is OK,but mha ssh check is fail

CentOS 6.6 + MySQL MHA(0.56)\ ssh-keygen -t rsa ssh-copy-id -i /root/.ssh/id_rsa.pub root@slave2 and my SSH check is ok [root@master ~]# ssh -v root@slave2 OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb ...
user avatar
1 vote
1 answer
4k views

Changing the ssh passphrase on a private key has no effect

I had a not protected by passphrase ssh key which I use to connect with a server. Now I want to add a passphrase to the key, so I've done: ssh-keygen -p and added a new passphrase: Enter file in ...
user avatar
  • 492
8 votes
2 answers
15k views

Getting SHA1 Digest of SSH Public Key

It seems like this should be easy. I run "ssh-keygen -l -f " (the default seems to be SHA1). All of the examples show it printing the hex-formatted digest with a little extra, harmless information. ...
user avatar
113 votes
4 answers
40k views

What significance does the user/host at the end of an SSH public key file hold?

I can’t figure out why does an SSH public key file generated by ssh-keygen have a user and host at the end of it. Example: id_rsa.pub ssh-rsa ... rest of file ... /CA9gyE8HRhNMG6ZDwyhPBbDfX root@...
user avatar
  • 1,820
1 vote
1 answer
81 views

users to connect SFTP server with openssh key [closed]

I want to be able to allow users to connect to my SFTP server with openssh key which I generated in keygen. How would I accomplish this?
user avatar
83 votes
6 answers
252k views

How to get a .pem file from ssh key pair?

I created a key pair using ssh-keygen and get the two clasic id_rsa and id_rsa.pub. I imported the public key into my AWS EC2 account. Now I created a windows instance and to decrypt that instance ...
user avatar
2 votes
1 answer
1k views

Deleted authorized_keys from EC2 but still have PPK file and I'm connected

I just deleted my full ec2-user/.ssh/ folder and I want to recover the keys so I can access my EC2 server without stopping and starting it. I have on my computer a PPK file that has something like "...
user avatar
  • 255
3 votes
2 answers
4k views

SSH by key incredibly slow

SSH connecting with key, from my machine suddenly got incredibly slow (~10sec!). It is not a server or DNS problem as far as I can figure out. The problem suddenly appeared after a simple apt-get ...
user avatar
  • 131
0 votes
1 answer
1k views

ssh-keygen key verification changed in OpenBSD 5.7, how to verify host_key?

OpenBSDs "ssh-keygen -l" output format has changed in 5.7. How to verify the host key when connecting from older ssh versions? Until OpenBSD 5.6 the host_keys fingerprint output format was like this: ...
user avatar
59 votes
4 answers
87k views

Straight forward way to run ssh-agent and ssh-add on login via SSH?

I'm trying to have the following commands be auto-executed when I login to my server via ssh: ssh-agent /bin/bash ssh-add ~/.ssh/id_rsa My ssh key has a passphrase and I'm fine with entering it once ...
user avatar