All Questions
Tagged with ssh-keys ssh-keygen
43
questions
0
votes
2
answers
141
views
How to remove all lines with the same public key from known_hosts?
Let's imagine the following scenario.
I have an host key ABCDEF1234 for a given hostname, so my known_hosts file looks like this (unhashed version):
example.com ssh-rsa ABCDEF1234
Now I connect to it,...
0
votes
2
answers
148
views
How does SSH host verification for github.com provide any value?
Running git clone [email protected]/repo.git warns me of a potential man-in-the-middle attack when GitHub change their SSH key, and that's cool. I then get the new key by running ssh-keyscan -t rsa ...
0
votes
1
answer
885
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 ...
0
votes
1
answer
34
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
270
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 ...
1
vote
1
answer
540
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 ...
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
3
answers
2k
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
889
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
0
answers
126
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
4k
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 ...
2
votes
1
answer
4k
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
369
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
707
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
3k
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....
2
votes
3
answers
7k
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 ...
3
votes
3
answers
513
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
93
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
960
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
203
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 ...
3
votes
1
answer
817
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
95
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" [email protected]
The ...
0
votes
2
answers
248
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 ...
132
votes
4
answers
53k
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@...
0
votes
1
answer
168
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?
3
votes
1
answer
2k
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 "...
0
votes
0
answers
84
views
Enable root password on remote server
I'm playing around with ssh-with-rsa-key authorization instead of password authorization and because I'm not really clever I've locked password authorization for root(passwd -l root) on remote server.
...
3
votes
1
answer
379
views
Best approach to generate and use ssh key pairs
New to ServerFault, but have been on StackOverflow for a few months and loving it.
I work on a daily basis on 5 servers I have been setting up for some time now.
These servers are all AIX 7.1, and ...
1
vote
1
answer
2k
views
SSH access to AWS working with default id_rsa.pub but not with key generated using ssh-keygen
Hi I've never posted a question here but, I'm trying to access an AWS instance without entering a password with the following and having some issues.
$ ssh -i ~/.ssh/id_rsa_aws.pub ubuntu@...
19
votes
4
answers
41k
views
Turn off strict checking of ssh keys
Each user creates and destroys 15+ VM's per day. The VM's are created in the company's internal OpenStack cloud.
Every time a new vm is assigned an ip address which has previously been handed out, ...
0
votes
1
answer
3k
views
ubuntu - public-key for authentication
I have a master and slave cluster. I am setting up cloudera manager.
On the master I created a passwordless key using the following.
ssh-keygen -f id_rsa -t rsa -N ''
eval `ssh-agent`
ssh-add ~/....
0
votes
3
answers
796
views
rsync without password, none of google (server fault) tutorials worked
I need to use rsync for a daily backup operation and in the past (on different servers) I managed to just use a rsa key etc, but now none of google (serverfault) tutorials work at all.
It keeps ...
1
vote
5
answers
35k
views
SSH as root using public key still prompts for password on RHEL 6.1
I've generated rsa keys with cygwin ssh-keygen and copied them to the server with
ssh-copy-id -i id_rsa.pub [email protected]
I've got the following settings in my /etc/ssh/sshd_config file
...
0
votes
2
answers
105
views
Remote host making strange request. Am I safe?
I am starting work for an organization on their server. They need to allow connections from my server in order to use GIT over SSH.
They asked me to place this in my SSH directory:
SHORTNAME=abcdef
...
2
votes
2
answers
5k
views
Creating SSH key for remote host
I am beginning work with a remote host. They require a "SSH KEY" from my server. How can I create a SSH Key that they can use to allow connections from my server? I would like to assign the key to a ...
50
votes
7
answers
23k
views
How to get all fingerprints for .ssh/authorized_keys(2) file
Is there a simple way to get a list of all fingerprints entered in the .ssh/authorized_keys || .ssh/authorized_keys2 file?
ssh-keygen -l -f .ssh/authorized_keys
will only return fingerprint of ...
7
votes
1
answer
6k
views
Choosing the encryption algorithm used by OSX ssh-keygen
I have several users that use SmartCVS on OSX to interact with our CVS repository. We use the cvs :ext: (SSH2) method to access the repository, which is stored on a remote linux system. We use ssh key ...
9
votes
2
answers
4k
views
SSH keys: why is id_rsa larger than id_rsa.pub?
My private key (~/.ssh/id_rsa) is a 1766-byte file, but my public key (~/.ssh/id_rsa.pub) is only 396 bytes in length. Why the massive difference? Is it because the private key is encrypted using AES? ...
3
votes
2
answers
1k
views
When are root's SSH keys generated?
I have hosts with and without keys in /root/.ssh. I've noticed before some on screen feedback for SSH key generation on start up (first time.) But I am not sure what the catalyst is. I have looked ...
0
votes
4
answers
2k
views
ssh-keygen problem
I have configured the ssh-key using keygen for password less authenticaton as from the following link http://rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca/documents/internet/node31.html
nO matter what i do this ...