Questions tagged [ssh-keygen]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
73 views

Why git authentications works through SSH keys?

Question in the title, but let me detail more. Excluding the ID/Password method on git CLI, we generate a SSH key and add the public key to the remote server. Why don't we have SSH-less public-key ...
izarc's user avatar
  • 13
1 vote
0 answers
836 views

Generating SSH key (ed25519-sk) with FIDO2 token fails with error "Key enrollment failed: requested feature not supported"

I am trying to generate SSH key using FIDO2 HW token (GoTrust Idem Key, USB-A) connected with command: ssh-keygen -O no-touch-required -t ed25519-sk -vvv and it fails with following error: Generating ...
Jan Koubek's user avatar
1 vote
2 answers
1k views

SSH key based login not working

I am trying to setup SSH key based login from server A to server B. I ran ssh-keygen on server A and used ssh-copy-id to copy the id_rsa.pub to server B. When I try to ssh user@serverB from server A, ...
Omar's user avatar
  • 41
0 votes
0 answers
749 views

ssh-keyscan: How confirm that the public keys asked and received are really authentic?

In the server exists in the /etc/ssh/ directory files such as: ssh_hosts_rsa_key.pub ssh_hosts_ecdsa_key.pub ssh_hosts_ed25519_key.pub They contain the public keys according with a key type, such as ...
Manuel Jordan's user avatar
0 votes
1 answer
44 views

How do I extract fingerprints from .ssh/known_hosts? but filtering for a specific key type

I read this question: How do I extract fingerprints from .ssh/known_hosts? The answer is valid, so I tried some variations: ssh-keygen -lf ~/.ssh/known_hosts -F 192.168.1.X ssh-keygen ...
Manuel Jordan's user avatar
1 vote
1 answer
408 views

SSH public key will not send to server

I have read through a number of sites to no avail. So I need to see if someone else can see what I am doing wrong. I am using ubuntu 18. Here is ssh -v output: debug1: Found key in /home/leithner/....
Sherry Sparks Leithner's user avatar
1 vote
1 answer
129 views

How to generate keys after creating user with adduser --disabled-password

On a remote server I want to create a normal user and ONLY allow access via a key but I do NOT want to create the account with a password first and then disable password access later. In my admin ...
D-Dᴙum's user avatar
  • 197
0 votes
1 answer
459 views

Convert RSA pair to pem filezilla compatible key on linux

I have a pair of keys generated using: ssh-keygen -t rsa -b 4096 -f ~/.ssh/keys/my_key -C "[email protected]". This yielded 2 files my_key and my_key.pub. Now I need to convert that pair to a ....
Enissay's user avatar
  • 103
0 votes
1 answer
785 views

Server still ask for password after ssh-copy-id

I copied my SSH public key to a server using ssh-copy-id, but the server still ask for a password. I checked the permission on the files in the ssh folder and they are readable for user only. I also ...
omerk's user avatar
  • 1
1 vote
0 answers
2k views

"no matching key exchange method found. Their offer: diffie-hellman-group1-sha1". How to fix the client not the server

So we recently updated our server and found an old linux client was failing to login and generating a "no matching key exchange method found. Their offer: diffie-hellman-group1-sha1", on our ...
Zendal Darkman's user avatar
1 vote
3 answers
328 views

Where is the undo button in Linux? If I created an SSH key and copied the public key to a NAS, how would I undo or delete it?

I created an SSH key using ssh-keygen -t rsa. Then I copied the key to the NAS, so I wouldn't have to enter a password using ssh-copy-id. I realized that I did it for the wrong user, so now I need to ...
anon's user avatar
  • 11
7 votes
2 answers
2k views

Is there a way to list what types of key ssh-keygen supports?

The man page for ssh-keygen on my system (Fedora 35) says that the following types of keys are supported: -t dsa | ecdsa | ecdsa-sk | ed25519 | ed25519-sk | rsa Specifies the type of key to ...
hugomg's user avatar
  • 5,737
1 vote
2 answers
1k views

How to get the email of the logged in user when login occurs through SSH keys?

I’m using bash shell and Ubuntu 18.04. I SSH into the server using a fairly standard RSA public-private key set up, where I put my public key in the .ssh/authorized_keys file of the server, entry ...
Dave's user avatar
  • 2,528
1 vote
1 answer
2k views

how to create an ssh key-pair for a service account

I would like to generate an ssh key pair for a service account on one machine to access another machine via ssh. When I generate the key with my user, my username is embedded in the public key. E.g. ...
Bryon's user avatar
  • 329
0 votes
1 answer
1k views

Unable to clone repo from gitlab into Oracle VirtualBox VM (CentOS) - host key verification failed

I am trying to clone a repo from gitlab into Oracle VirtualBox VM (CentOS) hosted on Win 10 machine. Following are the steps: generate key via ssh-keygen -t rsa and copy the key from generated id_rsa....
Ulysses's user avatar
  • 103
0 votes
1 answer
2k views

ssh-keygen -t rsa1 is failing

On Ubuntu 18.04 ssh-keygen -t rsa1 is failing with: unknown key type rsa1. However when typing ssh-keygen -t rsa auto-complete gives me two options: $ ssh-keygen -t rsa rsa rsa1 How can I generate ...
Andreas Triantafyllos's user avatar
5 votes
1 answer
3k views

How to verify fingerprint of Dropbear RSA host key?

When I connect to my Dropbear SSH server for the first time, I get the following message: me@laptop:~$ ssh me@server The authenticity of host 'server' can't be established. RSA key fingerprint is ...
finefoot's user avatar
  • 3,020
1 vote
1 answer
2k views

How to convert RFC4716 private keys to PEM private keys?

How to convert RFC4716 private keys to PEM private keys in ubuntu 20.04? For our project we generated ssh keys on a device running the latest openssh software. JSch complained about authentication: ...
JK-Hu's user avatar
  • 43
1 vote
1 answer
1k views

Reverse SSH works but not passwordless. Getting password prompt

I have two systems Personal MacOS Laptop to be referred as system-Laptop having user laptopuser. It does not have "NAT" Server Linux to be referred as system-Server having user serveruser ...
Ashar's user avatar
  • 491
15 votes
3 answers
23k views

sign_and_send_pubkey: signing failed for RSA key; from agent: agent refused operation

I have a new machine running debian sid on which I generated a new ssh key-pair. I wanted to find a convenient way to copy this new key-pair to various other machines using my old Ubuntu machine and ...
firedrillsergeant's user avatar
4 votes
0 answers
540 views

bash + how to avoiding duplicate entries in authorized_keys (ssh) in bash

Popular methods of adding an ssh public key to a remote host’s authorized_keys file include using the ssh-copy-id command, and using bash operators such as >> to append to the file. An issue ...
user avatar
6 votes
2 answers
2k views

how to append public keys to remote host instead of copy it

I used in my bash script the follwing cli , in order to send the public key to remote machine sshpass -p $pass scp /root/.ssh/authorized_keys root@$remote_host:~/.ssh/authorized_keys but since we ...
user avatar
1 vote
1 answer
1k views

SSH key accepted but remote host asks for password

I'm trying to get two server to connect via ssh keys. These two servers had working ssh key authentication before, but one of them failed and was restored from a backup. Since then, the key does not ...
dkd6's user avatar
  • 77
0 votes
0 answers
516 views

How does one stop an ssh connection from hanging after changing keyfile permissions?

I am automating a sequence of ssh commands using bash and got them working when the script is called from the command line. An example call of ssh that was in the script is below. ssh-keyscan -H $...
jcnoe's user avatar
  • 9
0 votes
1 answer
1k views

Trouble accessing remote server with public key

i am posting this question after extensive search in google to create public key and accessing server using public key, i am still unable to resolve this issue, as i am getting below error. OpenSSH_7....
Maria628's user avatar
  • 103
0 votes
1 answer
477 views

SSH key not working with a different name

When I'm trying to log in to a server using a public key for a ssh connection with a different name (other than id_rsa.pub, which is default name, I guess), it is not working and keeps asking for the ...
Vinit Bhardwaj's user avatar
1 vote
1 answer
95 views

Can I add SSH key to my machine that another user generated on their machine?

Another user and I are both using the same Ubuntu machine. They created an SSH key and disabled password authentification. Now I can no longer ssh into my user account on the Ubuntu machine. He saved ...
user9964422's user avatar
0 votes
1 answer
20 views

Unix authentication not working using Unix keyfile for one user but working for other

My OS details: NAME="Oracle Linux Server" VERSION="7.4" ID="ol" VERSION_ID="7.4" PRETTY_NAME="Oracle Linux Server 7.4" I am trying to create a Unix keyfile for one of the defined users.  But it is ...
Mahesh's user avatar
  • 1
0 votes
2 answers
2k views

Why ssh-keygen -f "~/.ssh/known_hosts" -R "hostname or ip" doesn't work? [duplicate]

When I type this command, the following message appears: line 1 invalid key: -----BEGIN ... ~/.ssh/known_hosts is not a valid known hosts file. Not replacing existing known_hosts file because of ...
Mohsen Yavari's user avatar
1 vote
4 answers
16k views

How to create .pem file - full process

I want to create a .pem file to connect to the server. I know that I can use ssh-keygen, But I want to use it for a specific user, And I need a script that will do for me all process. My need is to ...
Eliya's user avatar
  • 55
0 votes
1 answer
95 views

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

we want to cause status from linux remote machine that return "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r", "@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\r", "@@@@@@@...
yael's user avatar
  • 13.1k
0 votes
1 answer
194 views

ssh ask passwd also after copy-id

the problem is from his machine to this server, to other pc is all ok .the server correctly receive ssh connection from other pc whitout asking pass! OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013 ...
ankx7's user avatar
  • 3
0 votes
2 answers
1k views

SSH keys that can be used only in one machine

My requirement is simple. I have generated a SSH key-pair (Public and Private) on a server say "A". Now I have uploaded my Public SSH key in AWS IAM and have generated a SSH key ID to connect to a ...
vishal's user avatar
  • 111
0 votes
1 answer
249 views

mounting sftp with ssh-keygen: Remote execution disabled; possible workarounds, other methods

I try to configure my system so that I can mount an sftp server without my password. I tried to do this with ssh-keygen and ssh-copy-id, but got an error. $ ssh-keygen ... $ ssh-copy-id user@sftp....
Hielke Walinga's user avatar
0 votes
1 answer
115 views

Add additional key pair for authentication

I need to have a new key pair for an additional host that will be allowed to login to the server ( but I can't share the existing pair due to security reasons). Now, I created a new pair on the ...
stdcerr's user avatar
  • 2,069
5 votes
1 answer
4k views

What does `ssh-keygen -r` do if a public key is not specified?

Short Question I'm assuming that ssh-keygen -r hostname uses a default public key. I would have thought that it would default to ~/.ssh/id_rsa.pub, but that does not appear to be the case. So what is ...
igal's user avatar
  • 9,876
1 vote
2 answers
461 views

SSH Password-protected Private Key Still Visible

I thought it was not be possible to view the content of a password-protected private key file without actually inputing a password. Very surprisingly though, I can still see the content of my private ...
Faxopita's user avatar
  • 179
1 vote
2 answers
2k views

SSH key not found on remote machine [closed]

I have the following setup: I have my laptop A, a computer B, and a remote machine C. C can only be accessed from B via ssh, B may be accessed via ssh from A or used directly. A is always used ...
Christopher's user avatar
0 votes
1 answer
5k views

SSH login without password and without keys [duplicate]

Is it possible to configure a user to login via SSH without password and without using keys. Just typing "ssh user@server". I have tried some modifications with Match User and with AllowUsers in /...
Miro's user avatar
  • 1
1 vote
1 answer
5k views

show values of an ed22519 private key stored in OpenSSH format

(note this question uses both 'openssh' and 'openssl' in the text, I am not confusing the two.) If I use openssh to general an RSA keypair (ssh-keygen) then I can use 'openssl rsa -in ...' to view ...
r.l.'s user avatar
  • 61
1 vote
0 answers
1k views

How to ssh-add elliptic curve key?

I'm trying to use a newly generated elliptic curve key with git version control for GitLab. I am using a Xubuntu 16.04. My OpenSSH version is: OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g 1 Mar ...
Zelphir Kaltstahl's user avatar
0 votes
1 answer
1k views

Give default path for id_rsa in a shell script

I want to automate user creation along with the rsa key generation in a shell script. But while generating the rsa key we need to give inputs for these three things. Enter file in which to save the ...
TheDataGuy's user avatar
5 votes
2 answers
1k views

How to copy public key to the server that doesn't allow password?

I configured my server to not allow password authentication. Now I have a new machine in a remote location, how is it possible for me to generate an ssh key and do an ssh-copy-id to the server if the ...
Lance's user avatar
  • 163
-1 votes
2 answers
110 views

SSH key creation in stand alone machine

is it possible to create ssh keys (ssh-keygen) in stand alone machine. and then copy private ssh and public ssh key to client ssh directory and server ssh directory to perform password less ...
siva prakash's user avatar
0 votes
1 answer
389 views

pros/cons between generating ssh keys on client vs server

if i'd like to have another user be able to ssh into my ec2 instance, is there any pros/cons between generating an ssh key for that user in the ec2 instance, and then copying the private key to that ...
user3226932's user avatar
0 votes
2 answers
1k views

SSH key setup to login multiple hosts without password

I installed Putty on my local Windows machine A. I am connecting to remote linux server B from A. From B, I want to connect to multiple other remote machines C, D, E, F etc without entering password ...
aruncoder's user avatar
0 votes
2 answers
2k views

How can the, encrypted with AES, and BASE64 encoded, SSH private key, have size smaller than specified?

This might be obvious to some, but I wonder, if I generated 8192 key in size with: ssh-keygen -t rsa -b 8192 How can the, encrypted with AES, and BASE64 encoded, SSH private key, have size smaller ...
Vlastimil Burián's user avatar
0 votes
1 answer
94 views

After setting up ssh-keys, how can I ssh into the server such that the key-pair will be ignored?

I have key-pairs to ssh and scp into a server without entering my password. There are numerous tutorials on this, e.g. https://alvinalexander.com/linux-unix/how-use-scp-without-password-backups-copy ...
ShanZhengYang's user avatar
14 votes
3 answers
51k views

Add key to authorized_users without needing to restart sshd

I am trying to add a public key to a server but I don't want to restart the sshd service for it to take effect. The reason is that restarting the ssh service seems to be disruptive for other users who ...
user1952500's user avatar
0 votes
1 answer
1k views

I want to gather the host keys but ssh-keyscan command is not found on my linux. Anyway to achieve the same with some other commands

I want to gather the host keys but ssh-keyscan command is not found on my linux. Anyway to achieve the same with some other commands without adding this command explicitly. I am running with Wind ...
BRT's user avatar
  • 43