Questions tagged [ssh-keygen]
The ssh-keygen tag has no usage guidance.
81
questions
0
votes
1
answer
56
views
What is the host key (the one from ssh connection) and how is it different from public-private key pair?
The situation is that I've had a VPS created previously. It was all set up, private-public key authentication, root login turned off, password login turned off. Everything was set up.
Then this server ...
1
vote
1
answer
37
views
Is it safe to ssh-keygen a "ecdsa-sk" or "ed25519-sk" in a potentially compromised environment?
I'm wondering whether it would be a good practice to make sure the keys are generated in a safe environment, like a live Linux distribution, instead of just generating them in a day-to-day environment ...
0
votes
1
answer
33
views
SSH key for 2 client users to 1 server user
If this is a duplicate, I'm sorry.
I have searched my case but I couldn't find the right scenario that resembles my situation, although I thought that this situation must have come up before for ...
1
vote
1
answer
75
views
Validate all public keys in authorized_file
In my authorized_file i have multiple public keys against one private key. Now i want to add a task in ansible which will validate that all public keys are valid keys and good for connection. My aim ...
0
votes
0
answers
260
views
Create a public SSH key from the private key? Is an `ssh-ed25519` public key unrecoverable?
I want to recover my ssh public key from my private key. I am aware of this answer but it doesn't seem to work for me. When I run the command suggested ssh-keygen -f ~/.ssh/my_key -y > ~/.ssh/...
0
votes
2
answers
660
views
ssh-keygen unable to verify key "unknown option -- Y"
Context:
I am trying to verify my public key on a Gitea instance. Gitea provides a token for me to generate a signature; The instructions say:
echo -n 'TOKEN_PROVIDED' | ssh-keygen -Y sign -n gitea -f ...
0
votes
0
answers
132
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 ...
1
vote
1
answer
448
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?
0
votes
1
answer
2k
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 ...
0
votes
1
answer
367
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 "...
0
votes
2
answers
16k
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 ...
1
vote
0
answers
1k
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
$ ...
0
votes
1
answer
152
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 ...
0
votes
3
answers
1k
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 ...
0
votes
0
answers
795
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 ...
0
votes
1
answer
124
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:...:...:...:...:......."
...
0
votes
1
answer
728
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:
...
0
votes
2
answers
708
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 ...
0
votes
0
answers
118
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 ...
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 ...
1
vote
0
answers
267
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 ...
1
vote
2
answers
3k
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 ...
1
vote
1
answer
3k
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 ...
-1
votes
1
answer
353
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
1
vote
1
answer
4k
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 ...
0
votes
1
answer
128
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 ...
7
votes
2
answers
3k
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 ...
1
vote
1
answer
553
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-...
1
vote
1
answer
2k
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. ...
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....
0
votes
1
answer
170
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 ...
2
votes
0
answers
4k
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, ...
2
votes
2
answers
303
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",
"@@@...
2
votes
3
answers
6k
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 ...
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....
2
votes
3
answers
463
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/...
2
votes
1
answer
84
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 ...
2
votes
1
answer
857
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 ...
1
vote
0
answers
190
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 ...
7
votes
2
answers
7k
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 ...
3
votes
1
answer
703
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:
...
0
votes
1
answer
2k
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 > ...
0
votes
0
answers
90
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 ...
0
votes
3
answers
370
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 (...
0
votes
1
answer
2k
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 ...
0
votes
2
answers
233
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 ...
0
votes
1
answer
645
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 ...
2
votes
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 ...
8
votes
2
answers
18k
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. ...
132
votes
4
answers
50k
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@...