Questions tagged [key-authentication]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
449
votes
26answers
689k views

Why am I still getting a password prompt with ssh with public key authentication?

I'm working from the URL I found here: http://web.archive.org/web/20160404025901/http://jaybyjayfresh.com/2009/02/04/logging-in-without-a-password-certificates-ssh/ My ssh client is Ubuntu 64 bit 11....
12
votes
3answers
4k views

How to make password-less login work

I generated a key and copied it to my target: ssh-keygen ssh-copy-id username@hostname I left the the location of the key as default and did not set any passphrase. For a small while after that, I ...
62
votes
2answers
249k views

How to enable diffie-hellman-group1-sha1 key exchange on Debian 8.0?

I am unable to ssh to a server that asks for a diffie-hellman-group1-sha1 key exchange method: ssh 123.123.123.123 Unable to negotiate with 123.123.123.123 port 22: no matching key exchange method ...
360
votes
8answers
331k views

How to force ssh client to use only password auth?

If I use pubkey auth from e.g.: an Ubuntu 11.04 how can I set the ssh client to use only password auth to a server? (just needed because of testing passwords on a server, where I default log in with ...
72
votes
11answers
307k views

ssh_exchange_identification: Connection closed by remote host (not using hosts.deny)

I'm not using hosts.allow or hosts.deny, further more SSH works from my windows-machine (same laptop, different hard drive) but not my Linux machine. ssh -vvv root@host -p port gives: OpenSSH_6.6, ...
5
votes
1answer
2k views

Automated ssh login with passphrase?

Logging onto a machine over ssh typically requires a password to be entered before access is granted. Alternatively, a key/certificate (without a passphrase) can be installed onto the remote machine ...
3
votes
2answers
1k views

How to auto mount an ssh file system on demand with an RSA key

I am trying to auto mount a folder from my raspberry pi (/home/pi/server_folder), to a local folder (/home/my_name/raspberrypi). I can do this with sshfs (auto mount in fstab) when I set up a blank ...
1
vote
3answers
78 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....
208
votes
6answers
234k views

How to avoid being asked passphrase each time I push to Bitbucket

I set up my ssh stuff with the help of this guide, and it used to work well (I could run hg push without being asked for a passphrase). What could have happened between then and now, considering that ...
21
votes
2answers
123k views

SSH key-based authentication: known_hosts vs authorized_keys

I read about setting up ssh keys in Linux and have some questions. Correct me if I'm wrong… Let's say host tr-lgto wants to connect to host tr-mdm using ssh. If we want to be sure that it's the real ...
73
votes
3answers
12k views

Server admin sent me a private key to use. Why?

I'm supposed to be accessing a server in order to link a company's staging and live servers into our deployment loop. An admin over on their side set up the two instances and then created a user on ...
67
votes
3answers
60k views

How to specify key in SSHFS?

I've got a question that I've not been able to find an answer for. I have two computers, both of which run Ubuntu Linux 12.04. I have set up my first computer ("home") to be able to SSH into my second ...
18
votes
5answers
53k views

SCP from one server to another without password prompt

What is the best way of doing scp from one box to the other without prompting for password? There are two servers: Server A (10.152.2.10): /home/oracle/export/files.txt Server B (10.152.2.11): /home/...
10
votes
1answer
15k views

ssh into an account which has no home directory

As a follow up to my previous question, I have decided to create the local user accounts as below. adduser --system --no-create-home USERNAME Now, I would like the local users to be able to access ...
7
votes
1answer
14k views

How to convert SSH public key from PEM to DER format?

I'd like to convert an existing public key (generated using ssh-keygen) from PEM-format to DER-format I tried: openssl rsa -in ~/.ssh/id_rsa.pub -inform PEM -pubin -outform DER -out ~/.ssh/id_rsa....
3
votes
3answers
1k views

Why can't I login on the remote computer without a password after using SSH-KEYGEN command?

I have two computers. From the first I created the account admin1 with password admin1. Then I logged in as a root user and used the ssh-keygen -t rsa command. I did not give a password and hit Enter ...
10
votes
1answer
3k views

Given a private SSH key, how do I recover my public key?

I've somehow lost my id_rsa.pub file. I still have my id_rsa file. How do I recover the public key from the private key? (This question came up after ssh-copy-id was reporting "ERROR: No identities ...
2
votes
5answers
13k views

Unable to login with SSH-RSA key

This post is following this question : Authentication refused: bad ownership or modes for file /var/git/.ssh/authorized_keys . The issue as exposed there is solved (about files modes of the ....
7
votes
3answers
16k views

parallel-ssh with Passphrase Protected SSH Key

I'd like to use my passphrase protected SSH key when performing tasks with parallel-ssh (and related tools). However, I can't get this to work. All the documentation, regarding parallel-ssh, show ...
6
votes
5answers
17k views

ssh prompts for password despite .ssh/authorized_keys

I issued ssh username@db2workgoup -n "echocat ~/.ssh/id_dsa.pub>> ~/.ssh/authorized_keys" and then checked that the key was stored in authorized_keys file. But ssh is still asking for the ...
5
votes
1answer
916 views

ssh public key auth: first login still asks for a password

I have set up public key authentication with ssh, but what happens, is that when I first log in, it still asks for a password, any subsequent login (while keeping the first login alive), does not ask ...
2
votes
1answer
232 views

SSH login issue with two different user names

I'm facing a login issue with SSH (dsa), here the scenario: On my host I've created ssh keys for the user dx and set permission of .ssh and id_dsa and id_dsa.pub I sent the public key to the remote ...
2
votes
1answer
361 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: ...
55
votes
6answers
85k views

how to avoid ssh asking permission?

We are attempting to speed up the installation of oracle nodes for RAC installation. this requires that we get ssh installed and configured so that it doesn't prompt for a password. The problem is: ...
11
votes
2answers
6k views

Restrict password-less backup with SFTP

I need to perform backup of a server to my computer using Duplicity: duplicity /etc sftp://backup@my.dynamic.ip.address//home/backup Before this can be done, I need to allow password-less access by ...
12
votes
2answers
2k views

A consistent and safe approach to passwordless accounts with SSH

I must admit that I like servers without passwords in some cases. A typical server is vulnerable to anyone who has physical access to it. So in some cases it is practical to lock it physically and ...
4
votes
3answers
9k views

Why can't I use public/private key authentication with ssh on Arch Linux?

I have the following setup on an Ubuntu machine: ~/dotfiles/authorized_keys2 ~/.ssh/authorized_keys2 -> /home/wayne/dotfiles/authorized_keys2 I had the same setup on my Arch machine, but when I ...
18
votes
3answers
36k views

Authentication refused: bad ownership or modes for file /var/git/.ssh/authorized_keys [duplicate]

EDIT The issue as exposed here is solved (about files modes of the .ssh folder. But an other issue persists so I create a new question : > Unable to login with SSH-RSA key I can no longer ...
9
votes
1answer
473 views

Is there a technical reason why ssh-agent lacks a sudo-like inactivity/idle timeout feature?

There are some brief discussions about the existing ssh-agent -t feature at [1], and there was a post as far back as 2001 on debian-devel [2] wishing for an inactivity timeout feature. There's a ...
6
votes
6answers
44k views

SSH: “Server refused our key” with no reason

I was trying to set up a simple backup script to run automatically that would copy a file from a Windows machine to a Linux one through SSH. As a lot of simple online tutorials suggest I used pscp ...
0
votes
1answer
3k views

What are the keys accepted by openSSH?

Question is simple: What are the (private) key types and (their specification - format, syntax) accepted by current openSSH? The vague answer "the keys generated by ssh-keygen" is not accepted - I ...
5
votes
1answer
3k views

How does OpenSSH determine the choose the host key algorithm?

After updating raspbian and all of its libraries I noticed something different about SSH. When I delete the 'known hosts' file in my home and ssh into my box it provides me with the hosts public key ...
4
votes
2answers
9k 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 ...
2
votes
1answer
1k views

Why failing to get CRAN key for R backports?

I do and get # http://stackoverflow.com/a/10260634/54964 root@masi:/home/masi/Documents# gpg --keyserver subkeys.pgp.net --recv-key 06F90DE5381BA480 gpg: directory `/root/.gnupg' created gpg: new ...
2
votes
2answers
5k 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 ...
1
vote
1answer
129 views

sudo authentication when using SSH key auth with Keepass+Putty

I an using Putty to login via SSH to various Linux machines (mostly CentOS and Ubuntu). I use SSH key authentication, whereas the key ist stored in Keepass 2.x and handed over to Putty via tha ...
8
votes
2answers
9k views

Send the password through stdin in `ssh-copy-id`

I need to automate some identity deployments, ideally using ssh-copy-id. I'm trying to provide the password through stdin, which is possible on ssh by using the -S flag. I'm aware that I can send ...
6
votes
1answer
1k views

How can I determine which SSH keyfile was used to authenticate a login?

We have a hosted CentOS 6.5 server in which we have a single user account. That account has been configured to use SSH keyfile authentication for the users who need to access it. I would like to be ...
3
votes
1answer
1k views

Setup SSH public key for login without password [duplicate]

Today I have setup 3 servers (4 including the server sending the SSH commands) with a public SSH key so I can automate some scripts It works on the 2 first systems but not on the third.. SSH still ...
3
votes
1answer
1k 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 ...
2
votes
1answer
663 views

Why do NoMachine NXclient docs instruct to copy over the server's private key?

Working to set up the GnuPG keymanager for SSH and now FreeNX server on CentOS 6 and NoMachine NXclient on my new install of ArchLinux I've been reading more about keys than I've ever read before. I'm ...
0
votes
3answers
2k views

creating and sending a self-signed public key using GnuPG in CentOS 7

I know that I can create a GPG keypair from the CentOS 7 terminal by typing gpg --gen-key and following the resulting steps, but how can I make sure that the resulting public key is self-signed? And ...