Stack Exchange Network

Stack Exchange network consists of 174 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-keys]

an authorization mechanism for SSH involving public-key cryptography.

0
votes
0answers
3 views

ssh-keyscan does not read .ssh/config?

I am using ssh-keyscan in a shell script to accept keys for hosts. The hosts are identified by hostname but not in /etc/hosts. They are in ./ssh/config so I can ssh <hostname> but I can not ...
0
votes
1answer
29 views

Why do SSH keys work for users `root` & `freebsd` but not `postgres` (database owner)?

I have been using FreeBSD running an a virtual machine at DigitalOcean.com. I use Secure Shell (SSH) from my Mac to remote into a console session on the VM. I used ssh-keygen to create the pair of ...
0
votes
0answers
12 views

Verify authenticity of SSH host on Digital Ocean droplet (FreeBSD)

When first connecting via SSH with keys to a newly minted Digital Ocean droplet VM running FreeBSD (per this tutorial), we get a message about “The authenticity of host blah-blah can’t be established”....
0
votes
0answers
19 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 ...
0
votes
1answer
36 views

Jenkins is asking: do you trust this host, store key in cache

I installed Jenkins in our Windows Server machine and wanted to run some scripts that clones our private repo from bitbucket. In the script, all it does is to clone the repo in the appropiate ...
0
votes
0answers
34 views

Apaache Web Server On google compute Engine

I am getting this error when I try to connect to SSH Connection Failed An error occurred while communicating with the SSH server. Check the server and the network configuration. When I checked ...
0
votes
2answers
92 views

SSH host key pair expects passphrase causing ProFTPD to fail

I need to create a docker image with ProFTPD and use it as SFTP server. Obviously I need SSH host keys for this to work but I don't want to create new keys every time I build the image. If I create ...
0
votes
1answer
21 views

redo ssh private key

I switched laptops recently and didn't transfer my keys over correctly. I was trying to ssh into my dns server but unable to. When I would go to ssh in after sending a new key based on This tutorial,, ...
0
votes
0answers
16 views

How to setup port-forwarding between docker cli and host machine? (Permission denied: publickey)

I'm inside a docker cli (via docker exec -it cli bash). And I need to host a simple development server (expressjs) in the container. For reasons of I dont want to get into, I cant create a dockerfile ...
2
votes
1answer
36 views

Ssh Key authentication only works if I am physically logged into the server

UPDATE: This issue was caused by home directory encryption I have a strange problem. I have created and installed keys and disabled password login for SSH. If I try to SSH to the server I get a "...
0
votes
3answers
65 views

how to ssh between to ec2 instance with ssh keys

I have two Ec2 Instance. Serve 1, OS: Centos - 7.5 Serve 2, OS: Centos - 7.5 Default username: centos Both are configured for passwordless login, so I have the ssh key with me. I am able to ssh ...
2
votes
1answer
65 views

SSH authentication sequence and key files : explain

As a background to troubleshooting various problems using SSH and rsync with key pairs, I wanted a straightforward overview of the sequence of events that takes place during SSH authentication, and ...
0
votes
1answer
23 views

Ssh key management in AWS like gcp

Google Cloud really Nails the SSH Key Management thing out of the box and AWS leaves it all up to you. In gcp your gcp login credentials are also used for SSH access. gcp automatically creates SSH ...
0
votes
1answer
33 views

Back up using Duplicity through SCP with key-based authentication

I want to back up my system to a remote server through SCP using Duplicity. However, I use key-based authentication. How could I do this?
1
vote
2answers
111 views

How to view ECDSA host key of a server?

When getting a message like the following, how can I view the key of the server? $ ssh example.com Warning: the ECDSA host key for 'example' differs from the key for the IP address '10.0.0.2' ...
0
votes
0answers
45 views

SSH proxy jump interactive

I have a system wherein I am using SSH proxy jump as a way to connect from machine A to machine X through some number of intermediary steps. The advantage to this is that I can have an SSHkey on ...
0
votes
1answer
171 views

Cannot ssh to ubuntu gcp instance

I migrated the vm from libvirt to Google Cloud Platform using Cloudendure. The initial sync is complete and is in Data Replication stage from over a week. Once the VM is launched using test mode and ...
0
votes
1answer
29 views

SSH keys for utility services on remote production server

For convienience I'd like to have a private SSH key on my remote server. But doing that creates a vulnerability if the server were hacked. Same as if I'd hard coded a password, anyone who broke in ...
0
votes
2answers
81 views

Ansible - wrong passphrase - even if it has to be correct

i am running ansible modules/playbooks (for example ping) with this command by user, who have sudo rights: sudo ansible -m ping hosts "hosts" is group of 2 hosts. When i run this, i'm asked for ...
1
vote
1answer
22 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: ...
28
votes
6answers
4k views

Have a system that expires SSH keys every 90th day

I have a customer that now requires us to change every password every 90th day due to their interpretation of GDPR. That's fine for the web-based system we develop for them because we can just ...
0
votes
3answers
176 views

Allowing SSH To use ssh-agent in bash script

I am working on recon for a set of systems my company is taking over and they use a different authentication method than we do. Specifically we use AD auth and a jump server to access systems where ...
-2
votes
1answer
88 views

VPN connection for SSH access to a single publicly available

My goal is to have a VPN tunnel on a single port on a server's public IP and be able to SSH into the server with an additional VPN layer of encryption. DETAILS OF THE SERVER CONFIGURATION: I am ...
0
votes
0answers
22 views

Git SSH keys for multiple accounts, 1 doesn't work

I've attempted to set up 2 ssh keys for my personal and work Bitbucket accounts using this guide here: this guide from Atlassian. One of my accounts is a personal account and the other is a work ...
2
votes
1answer
73 views

Require SSH key + Google Authenticator for one account, SSH key only for another

I am trying to setup an SSH authentication structure, but I'm struggling with issues in /etc/ssh/sshd_config vs /etc/pam.d/sshd. Requirements: Accounts with root/sudo privileges require public key ...
0
votes
1answer
148 views

How to use socket file to access server if SSH Agent forwarding is enabled

I have bastion host. I connect to the bastion host using username/password. And I have private key for destination Server. Flow: Local Machine -> Bastion -> Destination I know that It's ...
0
votes
0answers
284 views

EC2 ssh 'authenticity of host can not be established'

There are a lot of questions on ServerFault and StackOverflow about the problem of 'authenticity of host can not be established'. For instance: https://stackoverflow.com/questions/2360842/ec2-ssh-...
3
votes
2answers
285 views

How do you securely retrieve the ssh host keys from a google compute engine instance?

I want to update my ~/.ssh/known_hosts with the host key information for a newly created GCE instance. But I'm not sure how to securely retrieve that information. I thought something like gcloud ...
0
votes
2answers
48 views

AWS EC2: Can't log into instance

A few days ago, I created a new key pair for a client's AWS EC2 instance. For some reason, I could no longer log in with the prior key pair I created. Immediately after creating a new SSH key pair, I ...
0
votes
2answers
64 views

How to use ssh client without local OS login

I have server-like machines (they are not workstations, fully automated) and I need them to be able to run a script that opens a client ssh connection (to a 3rd party server such as github), and I ...
0
votes
0answers
51 views

Automatic write from web server to git production repository using passwordless SSH key: is it secure?

I have a wordpress website which have 4 different environments: development, preview, staging and production. This all are connected to 4 git remote repositories: development, preview, staging and ...
0
votes
1answer
174 views

Securely sharing SSH access in a team with SSH bastion

I need to share SSH access to a number of servers with my teammates and looking for a secure way to do it. I came up with a configuration involving a SSH bastion server, but not sure how (and if) it ...
0
votes
1answer
175 views

Lost connection with ssh server through web console ssh (GCP, Putty, gcloud terminal, Filezilla)

After a year using the VM instance in debian, we changed the ssh keys to connect to other computers, after having generated the pair of public and private keys with putty, and adding it to the ...
0
votes
2answers
127 views

SSH Public Key Management for a small team

I'm setting up a deep-learning workstation in my college's lab. It's running Ubuntu Server 16.04 and I set up a SSH server in it, to control it remotely. My task now is to make it available for my ...
0
votes
4answers
128 views

Using SSH keys from backup on another machine to access server

I created a server, and configured SSH to not allow root login and disable password access, so only accepts an SSH key to login. I have a machine A with a key, and I can access my server from that ...
0
votes
1answer
178 views

SSH from Mac to CentOS hangs forever when using a certain domain

I've been running a CentOS server on Google Compute for about a year. I SSH in every day without a problem. Suddenly, when I try to ssh in, the command just waits and waits and waits... After ...
0
votes
1answer
111 views

ssh connects okay from command line but from cron using publickey

To rsync (incremental) from remote server (Centos 6.x) to local client (Ubuntu 18.04) I copied the public key I created from client to server to execute rsync without password. ...
1
vote
0answers
233 views

How to set up authorized keys for dropbear local to openssh remote

I have a local machine running dropbear and I want to connect to a remote host running openssh without having to type the password every time. I have found lots of documentation on how to do the ...
0
votes
1answer
214 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 > ...
6
votes
4answers
7k views

How to generate host SSH keys via ansible?

I'm trying to re-generate ssh host keys on a handful of remote servers via ansible (and ssh-keygen), but the files don't seem to be showing up. The playbook runs OK, but the files on the remote are ...
3
votes
1answer
365 views

Setting up public key authentication to Linux server from Windows (ppk private key)

I created a public and private key using PuTTYgen and copied the public key to .ssh/authorized_keys under my user account. Then I try to specify the private key when trying to log in, but apparently ...
0
votes
0answers
46 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" user@host.edu The ...
2
votes
1answer
545 views

SSH into remote host using jump box

I have a current setup for my servers like below: My computer ---> Jump box -----> Target server in private network I connect to the jump box from my computer using command ssh -A jumpbox ...
1
vote
1answer
94 views

Recovering or regenerating lost AWS EC2 Key Pairs

AWS rookie here. I created a few EC2 instances under my AWS account and reused the same Key Pair for all of them. I believe (IIRC) that I had generated the Key Pair from inside AWS, but that could be ...
1
vote
1answer
280 views

How to get Terraform to see the identity when using KeeAgent?

I am creating servers on AWS using Terraform on a Windows machine and that is working great. When they are created I want to install docker on them. However, after creating them, the SSH connection ...
0
votes
2answers
157 views

How to tell SFTP which public key to use?

SFTP has an option "-i" to set the private key to use for public key authentication. However, there does not appear to be an option for which matching public key to use. Surely it must need this to ...
0
votes
1answer
445 views

FileZilla will not connect to Google Cloud VM after changing the SSH Keys

I have been using FileZilla to manage files on my GCP VM using SFTP. I created a key pair using KeyGen on Ubuntu Linux, copied the pub key into the SSH Keys on my VM instance and loaded the private ...
0
votes
1answer
36 views

GCP Login policy for instances

Inside gcp instance, there is missing pam.d module. Also it has it's own wrapper over ssh, so you have to use glcoud tool's ssh to get into the instance. While it is easy to setup login lockout policy ...
2
votes
1answer
53 views

Remote encrypted mount

I tried this sshfs without shell access, but I realized I should ask opposite way I would love to mount remote file system automatically, over encrypted tunnel preferably using private/public keys. ...
0
votes
1answer
169 views

SSH private key working on SFTP (filezilla) but not on console

I generated a SSH key using WHM "Manage rott's SSH keys to be used on SFTP and console SSH connection. Filezilla got connected easily with the private key and pass, but when I tried to use it on ...