The tag has no wiki summary.

learn more… | top users | synonyms

73
votes
19answers
92k 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 ...
11
votes
2answers
47k 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, ...
4
votes
2answers
26 views

SSH password requested when in Tmux

When I connect to my remote machine I do authenticate using a rsa key (I think is rsa, don't remember). If I do ssh from a regular shell I get logged on the machine without a password. However if I ...
0
votes
1answer
365 views

Creating MySQL database and user without password

I am building a set of bash scripts which basically prepare apache virtual hosts, git repositories and other stuff on a cloud server. So far so good, everything is working, but a big problem occurred: ...
4
votes
3answers
198 views

Automatic login via ssh (no GUI environment installed / no ssh-agent available)?

I have three systems, and I want to have them doing backups between them periodically. The two of them, have Debian Wheezy installed and the other one has Ubuntu 12.04 installed. Only the Ubuntu has a ...
1
vote
1answer
24 views

Remotely use SSH key authentication (3

I have a VM using ubuntu 14.04. running on a windows. If I use the terminal on the VM desktop, I can connect to my servers without passwords using registered SSH Keys. When I connect to the VM from ...
1
vote
0answers
71 views

How to add PuTTY private key to OpenSSH client

I am trying to setup scp on a new Ubuntu 14.04 system. This system will act as an SSH client to an already configured SSH server on another Ubuntu 14.04 system. I can use putty to SSH into the ...
3
votes
1answer
625 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: ...
0
votes
2answers
80 views

Permission denied when run script via ssh

I wrote script which download via scp and install some packages. SSH keys are added to host and when I run [root@HostB ~]# ./myscript everything is ok and packages are downloaded via scp without ...
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 ...
1
vote
1answer
84 views

How does Linux generate ssh keys after reboot?

I installed CentOS 7, and noticed that I have rsa and ecdsa keys generated. I deleted all of them and rebooted the machine. I got a new pair of rsa and ecdsa keys. How does Linux generate the keys? ...
-1
votes
3answers
792 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 ...
3
votes
1answer
156 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 ...
4
votes
1answer
953 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 ...
1
vote
1answer
78 views

SSH key authentication works with /usr/sbin/ssh -d, does not with the daemon?

CentOS x64 6.5: if I connect as root to my server and do the following: service sshd stop /usr/sbin/ssh -d I'll able to connect as user using public key authentication from my development machine: ...
4
votes
1answer
61 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 ...
0
votes
1answer
64 views

How to ssh with private key from other linux system?

I log in to my server (server1) with user, password and private key: key.ppk. I want to ssh from server2 to server1. So I do the following: ssh -i /srv/key.ppk root@XX.XX.XXX.XXX When ...
1
vote
1answer
2k views

Password-Less SSH Login not working [closed]

I create a SSH Key file on Server A using RSA method ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/oracle/.ssh/id_rsa): Enter passphrase (empty ...
1
vote
2answers
335 views

SSH agent loses keys after logging out

I added my SSH key having typed ssh-add ~/.ssh/id_rsa and ssh-add -l printed my key. But after logging out and logging in again I see The agent has no identities. I've tried setting a very ...
1
vote
1answer
149 views

Why does rsync look for DSA instead of RSA key when run from cron job?

I want to backup files from a server to my local computer using rsync. I can only log-in to the server with an RSA ssh key. I have stored the passphrase to the key in Seahorse Passwords and Keys, ...
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 ...
2
votes
1answer
124 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 ...
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 ...
1
vote
1answer
249 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 ...
1
vote
2answers
3k views

SSH public key won't send to server

I've been struggling with this for a couple hours so any help is greatly appreciated... I have 2x servers both of which I can ssh to with public keys from OSX, no issues at all there so I'm certain ...
2
votes
3answers
766 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 ...
1
vote
1answer
676 views

Login via ssh without password, getting authorized_keys file removed after first login attempt

I'm trying to configure passwordless login via ssh. I have Centos 6.5 This what I did: copied content of id_rsa.pub from my client machine to ~/.ssh/authorized_keys set permissions 700 to ~/.ssh and ...
2
votes
2answers
443 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
2answers
52 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 ...
0
votes
2answers
155 views

SSH Key not working [duplicate]

I created an SSH key on my laptop using ssh-keygen and then put it on some production servers so that I don' have to type my password every time. On some servers it is working well, but on some it's ...
3
votes
1answer
61 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. ...
1
vote
1answer
408 views

Does Public and Private key remain the same for a user or system?

I had requested access to a git repository and it was granted after I gave my public and private keys. ( generated using the common method ssh-keygen -t rsa which gave me : <user> @ ...
15
votes
1answer
10k 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 ?
2
votes
3answers
2k 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: ...
1
vote
3answers
88 views

How to move files between servers with PubKey authentication?

I have two servers and for both I'm using PubKey authentication only. Can I somehow scp files between them (with private key being only on my local machine?) ? Can I somehow use my private key for ...
4
votes
2answers
1k 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 ...
26
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 ...
3
votes
3answers
751 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 ...
1
vote
1answer
94 views

How to securely download rpmfusion keys

The Actual Problem I am trying to solve I am trying to automatically configure my fedora installations via salt to automatically have the rpmfusion repositories installed. In order to do this ...
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 ...
0
votes
0answers
42 views

Prevent scp from asking passphrase [duplicate]

I have enabled private key based access to my server. I have generated the certificates with a passphrase. So to ssh to that machine I have to do - $ ssh -i .ssh/id_rsa_server foo@example.com and ...
0
votes
2answers
75 views

I'm trying to install my public key manually w/ scp

I'm following a tutorial and it's going along well. I used ssh to connect fine. Then I created a private and public key. Which leads me to my first question it says that the keys have been saved to ...
0
votes
2answers
283 views

SSH authentication by public key and password in the same time

Something is not clear to me with SSH authentication. I have a Talend job which connects to sFTP (using SSH protocol) and on the property page of the component, I have the choice between: 1. ...
2
votes
2answers
1k 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 ...
9
votes
4answers
10k 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: ...
2
votes
1answer
276 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 ...
1
vote
2answers
389 views

Why SSH key login asking me the Passphrase every time?

I use PuTTY and followed this tutorial: http://www.howtoforge.com/ssh_key_based_logins_putty Every time I login I"m being asked to input the passphrase. How do I avoid having to do this?
0
votes
1answer
278 views

Why the non-root user can't login with a key in putty? [duplicate]

I read an article and found it very useful: http://www.howtoforge.com/ssh_key_based_logins_putty I made two key pairs for root and the other user. But it only works for root When it comes to the ...
1
vote
1answer
108 views

ssh key authentication not working from network/if-up.d/ scripts

I have two nearly identical scripts in network/if-up that need to access SSH keys. Permissions on SSH private keys are 600, so how can my scripts access these keys? I would prefer to keep the SSH ...
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 ...