Questions tagged [ssh-keygen]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
35 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
0answers
15 views

ssh-keygen : generate public key from private key? [duplicate]

I got a pub/pri key pair generated using ssh-keygen. ssh-keygen -t rsa -b 2048 Now say, I lost the public key but have the private key. So I want to generate the public key using private key, which I ...
0
votes
1answer
123 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
24 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
27 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
494 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
682 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 ...
1
vote
0answers
257 views

ssh-keys enabled but prompting for password [closed]

I have an user in an AIX server which could login with its ssh-keys. However all of a sudden, the system started prompting for password. In the /etc/ssh/sshd_config file the AuthorizedKeysFile is ...
0
votes
1answer
62 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
88 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
212 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
63 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
0answers
69 views

execute scp command as wwwrun

i would like to copy files using scp with ssh-keys after a php script is run in a browser. So the user executing the scp command is wwwrun.
0
votes
1answer
89 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 ...
2
votes
1answer
724 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
108 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
659 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
2k 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
1k 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
410 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
548 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 ...
1
vote
2answers
171 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
61 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
194 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
852 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
49 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 ...
7
votes
2answers
17k 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
578 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 ...
40
votes
1answer
3k 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 ...
8
votes
2answers
12k 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
19k 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
194 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
74 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
729 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
87 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? ...
4
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
99 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
765 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. ...
-1
votes
1answer
141 views

Add SSH keygen to Ubuntu

On my remote server I generated the SSH keygen using ssh-keygen -t rsa and now, I'd like to add the SSH keygen to my Ubuntu computer. It seem's not working using : ssh-copy-id -f user@remoteserver....
3
votes
3answers
4k views

How to understand ssh-keygen and ssh-copy-id?

As far as my understanding, machine(A) ssh-keygen generates a key, and ssh-copy-id gives this key to another machine (B), is it? But when this is done, to test whether this is done or not is using ...
7
votes
1answer
4k views

Check presence of a hostname under custom port in known_hosts

I need to add a check if the hostname is already present in the known_hosts. Normally I would do something like that: ssh-keygen -H -F hostname However, that does not seem to work for me in this ...
1
vote
2answers
644 views

How to generate SSHFP records with OpenWrt/Dropbear?

How to generate SSHFP records for a Dropbear instance at OpenWrt? I have dropbearconvert and openssh-keygen installed, but nothing works. Always invalid format or similar errors. There are two host ...
12
votes
1answer
9k views

Can I build a Docker container from Dockerfile in an interactive way with allocation of some pseudo TTY?

I build container from below Dockerfile: FROM ubuntu:14.04 ... RUN apt-get update && apt-get install -y vim #RUN ssh-keygen -f /root/.ssh/id_rsa -N strongpass123$%^ RUN ssh-keygen -f /root/....
5
votes
1answer
3k views

pem file difference - ssh-keygen vs openssl

I generated my public/private key pair using ssh-keygen -t rsa -b 2048 -v and then needed a .pem file and followed this https://serverfault.com/questions/706336/how-to-get-a-pem-file-from-ssh-key-...
3
votes
1answer
6k views

Converting SSH2 RSA Private Key to .pem using openssl

When i try to convert SSH2 RSA format based private key to .pem format, using openssl i am getting the below error. [jbadmin@xxxxxxx .ssh2]$ openssl req -x509 -key /home/jbadmin/.ssh2/id_rsa_2048_a -...
2
votes
2answers
201 views

How to know if I can use ssh keypairs?

After running successfully, my build script attempts to copy the final binary onto my FTP server using the scp command. Since the build takes a while, I don't want to be prompted for my password every ...