Questions tagged [ssh-keygen]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
20 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. ...
0
votes
1answer
113 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....
0
votes
1answer
43 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 ...
4
votes
1answer
389 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 ...
0
votes
0answers
11 views

SSH Key Gen Prompts For Non Root User

I recently set up ssh keygen on my Linux server/client machines. After copying the ssh key to server, I was able to login to sever are as root@ip (IP = server IP). But when I do the same setup for non ...
0
votes
1answer
346 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: ...
1
vote
1answer
294 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 ...
7
votes
1answer
4k 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 ...
3
votes
0answers
144 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 ...
6
votes
2answers
1k 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 ...
1
vote
1answer
84 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 ...
0
votes
0answers
225 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 $...
0
votes
1answer
442 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....
0
votes
1answer
71 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 ...
1
vote
1answer
50 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 ...
0
votes
1answer
18 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 ...
0
votes
2answers
1k 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 ...
0
votes
2answers
3k 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 ...
0
votes
1answer
86 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", "@@@@@@@...
0
votes
1answer
130 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 ...
0
votes
2answers
439 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 ...
0
votes
1answer
120 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....
0
votes
1answer
102 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 ...
5
votes
1answer
2k 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 ...
1
vote
2answers
171 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 ...
1
vote
2answers
1k 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 ...
0
votes
1answer
3k 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 /...
0
votes
1answer
3k 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 ...
1
vote
0answers
689 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 ...
0
votes
1answer
902 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 ...
2
votes
2answers
323 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 ...
-1
votes
2answers
76 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 ...
0
votes
1answer
280 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 ...
0
votes
2answers
960 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 ...
0
votes
2answers
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 ...
0
votes
1answer
56 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 ...
10
votes
2answers
28k 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 ...
0
votes
1answer
681 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 ...
43
votes
1answer
4k views

Why do portions of SSH public (and private) keys overlap?

Specifically, why are the first 25 characters of ssh Ed25519 public keys always the same? For example, if I make 5 keys with ssh-keygen -o -a 100 -t ed25519, the first 25 characters are always ...
11
votes
2answers
19k views

How to compare different SSH fingerprint (public key hash) formats?

When I log in to an SSH server/host I get asked whether the hash of its public key is correct, like this: # ssh 1.2.3.4 The authenticity of host '[1.2.3.4]:22 ([[1.2.3.4]:22)' can't be established. ...
3
votes
0answers
22k views

OpenSSH private key screwed up: Load key: invalid format [closed]

When attempting to change my SSH private key passphrase, I get the following error message from ssh: Load key "/home/me/.ssh/id_rsa.pub": invalid format The password encryption still works and my ...
0
votes
3answers
363 views

Linux: How do I upgrade ssh-keygen?

I want to make use of the updated version of ssh-keygen because that includes a hashing feature for fingerprints like so: ssh-keygen -E md5 -lf ~/.ssh/id_rsa.pub But my current version doesn't ...
2
votes
2answers
86 views

Use X SSH key when logging in to Y remote user?

I'm looking for a way to set a specific SSH key while logging to a remote host with a particular username. Is this possible within the SSH config file? For example: Use key "id_rsa-test" for ...
0
votes
2answers
2k views

Setting SSH trust between 2 service accounts

I am trying to setup SSH trust (for passwordless authentication) between user1@host1 TO user2@host2 so that user1@host1 can execute remote scripts as user2@host2. Both accounts, user1 and user2 are ...
3
votes
1answer
940 views

SSH asking me for passphrase which doesn't have any passphrase

I have generated the keys in Ubuntu 14.04 system using the following commands to use with ssh. ssh-keygen -t rsa -b 2048 openssl rsa -in id_rsa -outform pem > pk_rsa.pem openssl rsa -in pk_rsa....
0
votes
1answer
92 views

SSH key required for every connection

I installed an ssh key on my machine to connect to a server, why does it ask me to insert the password for that key even if I am trying to connect to a different server?
0
votes
1answer
1k views

Force ssh to ask for password and public key

I know this is a bit weird. I generated ssh keys on my server, but I still want to force clients to enter a passphrase to be able to SSH to the server,even if they have the key. Is that even possible? ...
5
votes
2answers
1k views

Does Gnome Keyring support new-format OpenSSH private keys?

Does gnome-keyring support SSH private keys that are saved in the newer OpenSSH file format? Will Gnome Keyring automatically import those private keys? In more detail: When generating a SSH private ...
-3
votes
1answer
105 views

Connecting from local computer to server - ssh [closed]

This is procedure that I use: $ cd .ssh bash: cd: .ssh: No such file or directory $ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/user/.ssh/id_rsa): ...
-2
votes
1answer
925 views

Can you use multiple ssh keys in the same location?

One creates an ssh key by the command ssh-keygen and then copy/paste the virtual key into the virtual server's authorized keys file. Normally, the key's contents are output into ~/.ssh/id_rsa.pub. ...