The tag has no wiki summary.

learn more… | top users | synonyms

66
votes
18answers
88k 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://jaybyjayfresh.com/2009/02/04/logging-in-without-a-password-certificates-ssh/ My ssh client is Ubuntu 64 bit 11.10 desktop and my server is Centos 6.2 64 ...
25
votes
2answers
2k views

Is it safe to give out my SSH public key for work?

I currently work remotely for a number of organizations which need me to access their servers regularly for maintenance and upgrades. Is it safe for me to add my RSA public SSH key to the ...
15
votes
1answer
9k views

How to list keys added to ssh-agent with ssh-add?

How and where can I check what keys have been added with ssh-add to my ssh-agent ?
12
votes
1answer
3k views

Is there an easy way to update information in known_hosts when you know that a hosts key has changed?

If a host's operating system has been re-installed and had its public key regenerated sshing to it will of course fail because the new key doesn't match the old one. Is there an easier way to tell ...
11
votes
3answers
9k 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): ...
11
votes
2answers
7k views

SSHFS specify key

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 ...
10
votes
4answers
6k 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 ...
10
votes
2answers
39k 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, ...
10
votes
3answers
1k views

How can I lock my own account from remote ssh login with password?

I don't want to disable remote login with password altogether, but I want to make it so that my account is only accessible with key pair authentication (there are other users who wants to use ...
9
votes
4answers
9k 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: ...
8
votes
2answers
18k 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 ...
7
votes
1answer
927 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 ...
6
votes
2answers
541 views

Is it possible to use one SSH key per account for each account on a given remote server?

Suppose I have a number of accounts on a server called SERVER. Let's call them ACCOUNT1, ACCOUNT2 and ACCOUNT3. Suppose I don't want to have to type in the password for the account each time I ssh ...
6
votes
3answers
535 views

Send an email any time an SSH key is used

I have about 30 nearly-identical CentOS 6 servers that I need to be able to push out updated config files automatically using an rsa key to log in as root. Usually this will just be rsync, but ...
5
votes
2answers
3k views

Multiple SSH private keys, possible?

Is it possible to have multiple SSH key in a single client, and let ssh choose the right one automatically?
5
votes
1answer
684 views

SSH Public key comment separator

I've created a SSH authentication key (with ssh-keygen) in two different servers, both with a useful comment, but the public key of one server has == between the key and the comment, while the other ...
5
votes
3answers
329 views

For a same unix or linux user, different sets of environment variables

I'm using tcsh, and for a specific project every member of my team connects to a server with the same user. (This is something we cannot change). The situation arises because I want to have some ...
5
votes
1answer
710 views

How to use keyfiles,for ZFS whole disk encryption?

Does anyone have a working implementation using keyfiles, preferably on SD Card, instead of a prompt for ZFS? I know how to do this with linux LVM/LUKS. In my opinion the FreeBSD full disk ...
5
votes
1answer
287 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 ...
5
votes
2answers
1k 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 ...
4
votes
1answer
717 views

Ssh keeps asking for passphrase several times

I have a remote machine, with which I have set up public-key ssh auth - that is, I can ssh to it without typing in password each time. And I have a set of actions in a script, which use that ssh ...
4
votes
1answer
930 views

Why ssh-copy-id prompts for the local user password three times?

Noticed from my previous question that when trying to copy an SSH public key to a remote host via ssh-copy-id, I am prompted for the local user password three times: ssh-copy-id myuser@myserver ...
4
votes
2answers
933 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 ...
4
votes
1answer
59 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 ...
4
votes
1answer
372 views

Force pubkey-auth user to set password at first login

When I create a new user account I ask users to send me a public key, and want to force users to set the password the first time they log in with keypair authentication. If I create an account with an ...
3
votes
1answer
154 views

How to know which public key was used when someone used passwordless ssh login?

Say for some reason, there is only a "user" account on a shhd server. Everyone has his own private key to ssh to the server, as "user". Then, is there a way to see who is he (during or after his ...
3
votes
1answer
310 views

How to point to ssh folder with private keys to automatically choose one?

I would like to be able to use ssh user@host without the -i identity_rsa_or_else_private_key_file . Is there a place somewhere in ssh configs where I can point where are the private keys located ...
3
votes
3answers
450 views

Must I store a private key in a file?

I have a db-driven application that needs to communicate with another server via ssh. The web app can generate a keypair and give the user the pubkey, or it can accept the unencrypted private key in a ...
3
votes
1answer
529 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 ...
3
votes
1answer
55 views

Accept any private key for authentication

Is it possible to configure OpenSSH (or any other standard sshd) to accept any key offered by a connecting client? EG ssh -i ~/arbitraryKey hostname grants a login shell while ssh hostanme doesn't. ...
3
votes
2answers
1k views

Is it possible to use ssh-copy-id once password based logins are disabled?

Is it possible to use ssh-copy-id once password based logins are disabled? Otherwise, is there an utility for adding an authorized public key to a user or should I edit the ~/.ssh/authorized_keys file ...
3
votes
3answers
694 views

Storing the private key password for auto-mounting SSHFS?

I connect to a server via sshfs using private/public key pairs. My local key needs a passphrase to use. NOTE: The public key has already been copied to the remote server. I'm looking for a method to ...
3
votes
1answer
610 views

Public-Key Authentication w/ Jailed SFTP User

I'm trying to set up a jailed SFTP user account on my own local machine to test an application with libcurl. I used this guide to help me figure out how to set up a jailed SFTP user: ...
3
votes
1answer
3k views

SSH publickey works for root but not user [duplicate]

Possible Duplicate: Why am I still getting a password prompt with ssh with public key authentication? I'm setting up a remote server. The sshd is configured to use publickey only. There ...
3
votes
1answer
1k views

How to validate an SSH public key?

I've had issues copying public keys to authorized_keys and winding up with an extra linefeed or space or something. Is there a way to simply validate that a key looks like a valid key? I don't have ...
3
votes
1answer
1k views

How to enable nagios user created by yum to use check_by_ssh

I've used yum install nagios on an Amazon Linux instance, and it created a nagios user with shell /sbin/nologin and homedir /var/spool/nagios. This is the behaviour on EC2. I want to use check_by_ssh ...
2
votes
1answer
562 views

Is it *really* possible to directly steal a private key if it uses no passphrase?

I've read in various places, such as in this question that using an ssh key pair without a passphrase allows attackers to steal your private key if they gain access to your account. I assumed that by ...
2
votes
2answers
421 views

How is using a public-key for logging in to SSH any better than using a password?

I'm not asking about password vs key authentication. I've seen a few times (and even Amazons AWS) says that even if SSH has a major vulnerability that key authentication would make such an exploit ...
2
votes
1answer
6k views

SSH asking for passphrase on public key with no passphrase set

I have been using public key authentication on my servers for a while now, but I am experiencing issues on a new 'client' trying to connect to github. I have read many threads to verify that my ...
2
votes
3answers
643 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 ...
2
votes
2answers
208 views

Automatically unlock keys on a remote host accessed via SSH

On my local PC my ssh keys are automatically unlocked on login. From there I access via ssh (with key authentication) a server that have stored the same keys I have in the client. I'd like to unlock ...
2
votes
2answers
985 views

SSH public key login: two different keys and SSH_AUTH_SOCK behaviour

A user (user1) on an Ubuntu 12.04 desktop has two SSH RSA keys configured: ~/.ssh/id_rsa and ~/.ssh/id_rsa1 (and .pub files). Both public keys are configured in the authorised keys on the server's ...
2
votes
2answers
51 views

Is there a one liner which can list public key fingerprints with authorised_keys as input?

I'd like to audit the authorised_keys file on a number of servers and match them with known AWS key fingerprints. Is there a one-liner which incorporates ssh-keygen -lf which will output the ...
2
votes
1answer
74 views

SSH asks password when outside .ssh/ but not when inside .ssh/

This is the strangest I've ever encountered and I have no idea how to fix it. I have many entries in my .ssh/config file because I use a number of keys. When I ssh and I am located outside my .ssh ...
2
votes
4answers
375 views

SSH Do not connect even with publickeys installed

I'm trying to connect two servers. I got the id_dsa.pub key from user john from server A and paste into authorized_keys of user mike from server B. Then I tried to connect from server A to server B ...
2
votes
1answer
3k views

net.ipv4.conf.all.mc_forwarding: why is my access denied?

On Debian 12.04 LTS I am trying to access the key net.ipv4.conf.all.mc_forwarding by doing : sudo sysctl -w net.ipv4.conf.all.mc_forwarding=1 But every time I am doing this, I get the message ...
2
votes
3answers
1k views

Rsync over SSH with authorized keys..but run 2 rsync commands

I just figured out how to automate my rsync backups using authorized_keys and the command= parameter so that my rsync script can't be modified by the user. So my authorized key file looks like this: ...
2
votes
3answers
1k views

Use SSH key authentification with custom user $HOME

I have some users which have different $HOME directories than /home/... The user homes are under /pkg/homeand /pkg owner is a different user but all users have group access to /pkg. But it seems ...
2
votes
1answer
256 views

dm-crypt and LUKS password rotation

How do you protect the master key, and distribute multiple passwords for admin access? Is there a 3rd party user management tool or is this native?
2
votes
1answer
117 views

Why do I need to insert the passphrase for an RSA key on a remote host after SSH?

From host B I can SSH various other hosts (C, D) without using any password as I put the public key in the correspondent authorized_keys files (in hosts C and D). From host A I can SSH host B (via ...