Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ssh-keygen]

The tag has no usage guidance.

0
votes
0answers
19 views

ssh-keygen print certificate file in older versions

The version I am using seem to be old and doesn't have the -L option. -L Prints the contents of one or more certificates. Is there an alternative way to do it? The script I'm using basically use ...
0
votes
1answer
15 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
31 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
58 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
127 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 ...
0
votes
2answers
72 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
78 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
752 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
318 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 ...
0
votes
0answers
139 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
183 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
votes
2answers
67 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
44 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
98 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
584 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
1k 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
38 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 ...
3
votes
2answers
6k 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
338 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 ...
36
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 ...
2
votes
1answer
4k 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. ...
2
votes
0answers
12k 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
128 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
63 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
749 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 ...
2
votes
1answer
402 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
76 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
832 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
869 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
74 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
487 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
132 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....
2
votes
3answers
2k 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 ...
5
votes
1answer
2k 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
1answer
527 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 ...
11
votes
1answer
7k 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/....
3
votes
1answer
2k 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-...
2
votes
1answer
4k 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
1answer
165 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 ...
1
vote
2answers
137 views

ssh public key not getting copied over

I created a public/private key pair using the ssh-keygen -t rsa in my ~/.ssh folder. I then copied the key over using the ssh-copy-id username@remoteserver.com command and received this notification. ...
0
votes
0answers
37 views

Why wont my ssh key work on a different port? [duplicate]

Edit: This answer, fixed my problem. I have used ssh-copy-id to move my ssh key to my server. I have changed it so that my server is listening for ssh connections on port 50505 instead of the ...
0
votes
1answer
326 views

Need Info on linux command ssh-keygen -t rsa -b 4096 -C “your_email@example.com”

I have to access personal git repository at the university . I have been asked to Generate SSH key. I am using this command to generate an SSH key: ssh-keygen -t rsa -b 4096 -C "your_email@example....
0
votes
2answers
4k views

How to generate SSH1 key using ssh-keygen for SSH2

I have 2 machines running on Linux. One has ssh2 configured SOURCE and another has ssh1 configured DESTINATION. How do I generate a key pair in SOURCE whose public key can be understood by DESTINATION?...
0
votes
1answer
675 views

How to change password of an ssh identity file

Can I, and in that case how can I, change the password of an SSH identity file without having to generate a new key and setting up it all over again?
1
vote
0answers
247 views

Very slow SSH connection unrelated to GSSAPIAuthentication option

I am having trouble connecting to remote machine through SSH machine (I cannot change SSH configuration on that machine though I can login without any delay from other machines). I have commented out ...
-1
votes
1answer
2k views

SSH error: WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

I ran rsync (cygwin) and got this error. I think they changed the Red Hat Linux OS from version 5 to version 6, last night. Would that be the cause of this error message? What do I need to do to fix ...
0
votes
1answer
4k views

Fedora, where to put my ssh keys to login? [duplicate]

I just recently started a VPS using Fedora. Upon creation of the VPS I was asked if I wanted to use SSH keys (which I did). Now, to connect as root to the VPS, I do not need to enter a password. Now ...
0
votes
1answer
179 views

SFTP Chroot and SSH

I have a chrooted SFTP user group to access my home server. The chroot location is /mnt/, mostly because it is already owned by root and is where I have mounted the external HDD I want to the chrooted ...
4
votes
3answers
4k views

How to merge keys, or handle keys with the same file name?

I created a key for logging into a server (using ssh-keygen) with the name id_rsa, and so in my .ssh directory there is id_rsa.pub and id_rsa. The reason I used this name, is because when I tried ...
14
votes
2answers
20k views

How to decrypt hostnames of a crypted .ssh/known_hosts with a list of the hostnames?

I try to find a script to decrypt (unhash) the ssh hostnames in the known_hosts file by passing a list of the hostnamses. So, to do exactly the reverse of: ssh-keygen -H -f known_hosts Or also, to ...