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 [key-authentication]

The tag has no usage guidance.

1
vote
1answer
31 views

Possible to get sshd (openssh) to log the public key of failed key based login attempts?

As I understand sshd (openssh in my case) typically does/may log the fingerprint/hash of the public key of incoming connections which are attempting to authenticate via key. What I'm looking for is ...
0
votes
2answers
52 views

Authenticate with a private key

Is it possible to authenticate myself with the private key at the public key? The scenario: I gave another company the public key so that I can authenticate myself with my private key at the sftp ...
0
votes
1answer
27 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
0answers
110 views

Add LDAP server certificate to trusted list and enable certificate verification

I am trying to use a secure LDAP connection via TLS ldaps://<server_name>:<port> for various applications (e.g. Gitlab). However, the connection raises certificate errors which is due to ...
1
vote
2answers
35 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
0answers
54 views

Linux server is not accept ssh private key to login without password?

I'm trying to connect to a server (as user) with a RSA key. I have uploaded the key using ssh-copy-id and it is properly located in ~/.ssh/ folder. Typically this would be enough to connect to the ...
0
votes
1answer
49 views

Locking account password and instead use RSA key

Setting up a CentOS 7 cloud server for a client, and have run into an issue with setting it to use a public RSA key instead of a password for one of a handful of SFTP users. Found an online guide on ...
1
vote
1answer
46 views

ssh asking for password when trying to login via public key

Although these lines are present in my server's /etc/ssh/ssd_config RSAAuthentication yes PubkeyAuthentication yes when trying to login to the above server by explicitly providing a private key to ...
1
vote
0answers
31 views

How can a script run by a user logged-in over ssh, get the user's public key? [duplicate]

I need to get the users public key, that was used to authenticate the current ssh session. Running env only shows: SSH_CLIENT=192.168.1.2 35538 22 SSH_TTY=/dev/pts/0 SSH_CONNECTION=192.168.1.2 35538 ...
2
votes
0answers
60 views

SSH asking for passphrase although ssh-agent / keychain is running

Disclaimer: It would be very nice to read this question thoroughly before marking it as duplicate. I have read dozens of other questions (here, at superuser.com, serverfault.com and so on), all ...
0
votes
0answers
107 views

ssh to another user of the same host using dns domain

Is it a problem to ssh to another user of the same host using dns domain? I cannot conigure it. I cannot configure it to passwordless connection. Also when I am trying to connect with password the ...
1
vote
3answers
65 views

How to tell what method was used to log in (Password vs. Keyfile) from the bashrc

Is there a way how you can check what auth method the user which just logged in to an account were using? I like to print out a warning after login if someone is using a password instead of a keyfile....
0
votes
1answer
56 views

multiple users remote access using ssh key based authentication

I'm new to Linux, I'm having CentOS 7. I want to allow multiple users for one server (Path - /var/www/ folder) using ssh key based authentication. For that I have created 2 new users from my root ...
1
vote
2answers
123 views

Check whether root-access is allowed without ssh-key

I want to check via BASH if root access on a certain server is possible without a ssh-key. So the script should check if you have access without SSH key or not. Here is my attempt: (pseudocode) /usr/...
0
votes
1answer
738 views

How to add a public key into system keyring for kernel without recompile?

I want to add a public key from the keypair that I used to sign my kernel module, into system_keyring. However, there's a problem: With the command of cat /proc/keys | grep system_keyring, I've got ...
1
vote
1answer
33 views

Setting up Public/Private Key Pair for Linux Login (not SSH)

I've searched Google and this site for the answer to this question, and haven't been able to find the answer. My goal is to use a public/private key pair to login to my desktop computer from a USB ...
2
votes
4answers
1k views

Sharing SSH Keys to login?

I am little bit lost or confused. I have some secure server where inside ~/.ssh/authorized_keys i have a key to remotely login those servers from my desktop (mac book ) Now that secure server need ...
1
vote
2answers
568 views

How to verify that ssh certificate was signed by specified ssh CA private key?

I am trying to harden my ssh setup using this material. It works fine, but I've got a question which I'm struggling to find the answer to. Does anyone know if there is a way to check the ssh host/...
0
votes
0answers
30 views

How to use 2FA with cert based SSH auth?

I used this guide to enable Google TOTP auth on Ubuntu 16.04. SSH only allows cert based auth (PasswordAuthentication no) I set ChallengeResponseAuthentication yes and restarted the SSH service. I ...
2
votes
1answer
97 views

How to enable usage of SSH keys pair without exposing it

We have a topsecret@remote.org SSH account that can be accessed with SSH key pair ts_key.pub/ts_key.priv from our gateway server (gateway.org). We have many sysadmins that need to access that account. ...
0
votes
2answers
615 views

What is the difference between /etc/ssh/ and ~/.ssh?

I’m having fun with OpenSSH, and I know the /etc/ssh directory is for the ssh daemon and the ~/.ssh directory is for a particular user. Both directories contain private and public keys: But what is ...
-1
votes
2answers
41 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 ...
-1
votes
1answer
213 views

Shell script “apachectl restart” password automation

In a shell/bash script (I use it for vagrant provision), I configure apache2 server and then restart it. But since I use a key file for https, apache asks for a password. How can I automate this and ...
1
vote
0answers
24 views

How can I list which users can login without key auth?

I have recently been charged with a large amount of Ubuntu servers that are exclusively accessed via private/public SSH authentication. There is no information regarding how these servers were ...
0
votes
0answers
371 views

SSH Login success, Permission denied in remote machine

I copied the ssh public key to a remote linux server with ssh-copy-id. (Ref: here) . And I am able to login with local@Me$ ssh myuser@remote.ser.ver login success myuser@remote $ ll drwxr-xr-x 3 ...
4
votes
2answers
449 views

Can I ssh via public key if there is no home directory on the remote system?

I currently have to ssh with user FOO then sudo to user BAR. I would like to ssh using a public key, but on the remote system there is no home directory for user FOO, so obviously no .ssh/...
2
votes
1answer
150 views

SSH public key exchange

I frequently SSH into a remote Linux server of which I am an authorized user. In order to make the communication more secure, I setup the public/private key authentication instead of using password ...
0
votes
1answer
35 views

What is the default number of login attempts before login fail

When I connect to a remote machine using ssh, my ssh agent will try all key files available in .ssh. Per default, how many key files can the agent try for the log-in until server sends permission ...
0
votes
2answers
4k views

SSH - Permission denied (publickey)

I know this question has been asked many times and I have tried the top answers from all of them, but I still can't get mine to work. It says that files like /home/valachio/.ssh/id_rsa are not found ...
2
votes
1answer
1k views

Connecting to server with SSH using public key

(I've previously asked this question on SuperUser, but having tested that the key works fine on a MacBook running OSX, I feel the problem must be with Debian): The problem I've recently setup a ...
0
votes
1answer
253 views

Passwordless SSH using pem file or ppk file not working anymore

I have an instance on OpenStack installed with CentOS-7-x86_64 that is accessed using putty, the pem file which was converted to ppk file using the puttygen, worked fine and provided passwordless ...
2
votes
1answer
250 views

Warning: remote host identification has changed!

As we all know, when we try to login to remote Linux machine we do ssh $remote_machine and enter password. In case the remote machine has been reinstalled from scratch then we should get the message: ...
4
votes
4answers
2k views

SSH is requiring password when public key is on remote host

So I have been struggling with trying to authenticate without a password. Here is all my steps. On Source Host ssh-keygen and saved the file into the default directory with a blank key phrase (enter) ...
2
votes
1answer
574 views

Who SSH'd into User using auth.log/RSA Key

Ubuntu 14.04: Using the auth.log im able to see: accepted publickey for $user from 192.168.xx.xx port xxxxx ssh2: RSA xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx Using that RSA Key how do i know ...
0
votes
2answers
2k views

Error: GPG check FAILED when upgrading system using dnf in Fedora

When I tried to upgrade a Fedora 26 Server earlier today, I got this error message after downloading packages: warning: /var/cache/dnf/forensics-5e8452ee3a114fbe/packages/protobuf-c-1.3.0-1.fc26....
0
votes
0answers
178 views

Key in DER format. Convert to line for .ssh/authorized_keys?

I have a file in DER format. I want to convert this file to a line for .ssh/authorized_keys. How could this be done?
0
votes
2answers
33 views

Configured Public/Private Key on CentOS6 - Still letting me connect without Private Key

I'm racking my brains here and I was hoping I could get some help. I have a VPS with CentOS 6. I've noticed a lot of login attempts via SSH, so I wanted to lock it down with key based authentication....
1
vote
1answer
835 views

SSH Connection on Remmina using AWS public key

I am trying to login to remmina using the ssh .pub key. but when I try to connect it is asking me to ssh private key passphrase. I do not know what I am doing wrong but here is a debug log. [SSH] ...
4
votes
2answers
4k views

How to login with ssh as a specific user?

On an Ubuntu AWS instance I want to ssh in as "thufir" with sudo privileges. Create user thufir with sudo adduser thufir and then adduser thufir sudo from the "ubuntu" user? Simply add my public key ...
1
vote
0answers
54 views

Ability to use GNUPG's Webkey as a Web Services authentication mechanism

Is there a way to use GNUPG's new Webkey capability to create a federated passwordless public key authentication mechanism for web services login? Something like the following architecture: .----...
5
votes
3answers
1k views

Best way to distribute user's public SSH key to many hosts?

Obviously I could scp the key to every host the user needs SSH access to. But if there are many hosts this could take a long time. Especially if public key authentication is not set up yet, every scp ...
-1
votes
1answer
100 views

Using public keys for SSH authentication on several servers

I'm using a key pairs method for authenticating my sftp client on a remore server, that is a black box for me. So I've sent them the public key that I've generated with ssh-keygen command. So far ...
0
votes
1answer
68 views

Does providing username once cause `ssh` to suddenly not asking for password anymore? [closed]

For a long time, I was baffled by why ssh command was asking for a password sometimes, and sometimes not. Even when I was using the same private/public key pair on many different clusters, I was ...
0
votes
1answer
148 views

How do I install an RPM key on my Amazon Linux system?

I'm using Amazon Linux. Here's the uname info [myuser@mymachine3 ~]$ uname -a Linux mymachine3 4.8.18-12.31.amzn1.x86_64 #1 SMP Thu Jun 22 06:20:54 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux I'm ...
1
vote
2answers
1k views

gpg encryption: error in decryption with confirmed key and exact command as past successful transmissions

Client A typically encrypts a file with a public key and sends it to Client B who has the corresponding private key to decrypt the file. My team is going to take over the responsibilities of Client ...
1
vote
1answer
2k views

GPG key import stuck at “gpg: keybox '/root/.gnupg/pubring.kbx' created” / Getting “gpg: keyserver receive failed”

So I executed gpg --keyserver keys.gnupg.net --recv id as root and get this: gpg: directory '/root/.gnupg' created gpg: new configuration file '/root/.gnupg/dirmngr.conf' created gpg: new ...
1
vote
2answers
317 views

Why can I login remote host without password or private key?

I am using Openwrt here, I find that I can login remote host without a password or private key. I added a SSH-Keys (public key) in System->Administration tab, this public key is a key pair with the ...
0
votes
1answer
86 views

Why is my SSH session prompting for password for one host only?

I have an environment where all SSH connections go through a jump-box. There are a bunch of linux servers, but to get to them I have to ssh to a bastien host then onwards. One specific internal host ...
1
vote
1answer
3k views

gpg: cancelled by user

Trying to create GPG keys which will be used for an apt repository hosted on my Centos7 box. I created a new user "apt", and then tried to create the keys, but at the very end, it states that I need ...
0
votes
1answer
1k views

Can I use GnuPG 2 and GnuPG 1 concurrently, seeing the same keys?

Here on a Debian system I use mainly gpg2. Some (Debian packaging/signing) tools use gpg1 internally, and changing them as it should be would be infeasible. Both my gpg versions are using the same ...