The tag has no wiki summary.

learn more… | top users | synonyms

37
votes
9answers
10k views

Why is SSH password authentication a security risk?

Most guides for OpenSSH configuration advise to disable password authentication in favor of key-based authentication. But in my opinion password authentication has a significant advantage: an ability ...
33
votes
5answers
3k views

Smoothest workflow to handle SSH host verification errors?

This is a simple issue that we all face and probably resolve manually without giving much thought. As servers change, are re-provisioned, or IP addresses reallocated, we receive the SSH host ...
19
votes
1answer
4k views

What is the meaning of an equal sign = or == at the end of a SSH public key?

I just noticed that most of the ssh pubkeys in my authorized_keys end on == or = E.g. ssh-rsa ...
18
votes
7answers
12k views

Is there an equivalent to ssh-copy-id for Windows?

Is there any equivalent or port of ssh-copy-id available for Windows? That is, is there an easy way to transfer SSH keys from a local machine to a remote server under Windows? In case it helps, I'm ...
17
votes
3answers
39k views

how do you create an ssh key for another user?

I'm trying to create an ssh key for another user. I'm logged in as root. Can I just edit the files generated by ssh-keygen and change root to the user I want?
16
votes
2answers
2k views

Why does my OpenSSH key fingerprint not match the AWS EC2 console keypair fingerprint?

When I import my OpenSSH public key into AWS EC2's keyring the fingerprint that AWS shows doesn't match what I see from: ssh-keygen -l -f my_key It is a different length and has different bytes. ...
14
votes
4answers
868 views

Publishing id_rsa.pub for easier setup of new environments?

To make setting up passwordless SSH easier on new machines and environments, is there any reason why the id_rsa.pub file (just the public half of the key pair) could not be published somewhere on the ...
12
votes
1answer
448 views

Can Bash Tell Me Which SSH Public Key Was Used To Authenticate?

Let's say I want to track my root users. Each of them has a unique private key and their public keys have been stored in /root/.ssh/authorized_keys. Given that each user logs in with their unique key ...
11
votes
2answers
571 views

What to do when someone logged as root on my server

I have a server running Debian 6.0 with logcheck installed. Yesterday ago, I received this message: Jan 19 19:15:10 hostname sshd[28397]: Authentication tried for root with correct key but not from a ...
10
votes
2answers
601 views

SSH: Safe for client to host private RSA key?

Is it safe to generate a public/private key pair on the server, add the public key to the authorized_keys list, and then copy the private key to each client, as described here ...
10
votes
2answers
2k views

How to get all fingerprints for .ssh/authorized_keys(2) file

Is there a simple way to get a list of all fingerprints entered in the .ssh/authorized_keys || .ssh/authorized_keys2 file? ssh-keygen -l -f .ssh/authorized_keys will only return fingerprint of ...
9
votes
2answers
7k views

How do I validate a RSA ssh public key file (id_rsa.pub)?

Are there any command I can verify the public key (id_rsa.pub), just the format only Sometimes I have added a new linebreak, sometimes the file missed the ssh-rsa prefix, so are there any command to ...
8
votes
4answers
5k views

Automating ssh-copy-id

I have some arbitrary number of servers with the same user/pass combination. I want to write a script (that I call once) so that ssh-copy-id user@myserver is called for each server. Since they ...
8
votes
1answer
611 views

Allow password access for all users except root?

I want to leave the root user enabled on my servers for convenience, and the only reason people are against the idea (that I know of) is brute-force attacks on SSH. So, is there is a way in SSH to ...
7
votes
1answer
3k views

Disable ssh password authentication by user

Is it possible to enable ssh password authentication for one user on a system and disable it for an other. If you add ChallengeResponseAuthentication no PasswordAuthentication no UsePAM no to ...
7
votes
4answers
12k views

How to change a SSH host key?

I cloned a server and so they've the same RSA key fingerprint. It seems to be defined in /etc/ssh/ssh_host_rsa_key.pub. What is the correct way to change that? Thanks.
7
votes
1answer
1k views

Only allow password authentication to SSH server from internal network

I have an OpenSSH 5.9p1 server running on Ubuntu Precise 12.04 which accepts connections from both the internal network and the Internet. I'd like to require public key authentication for connections ...
7
votes
4answers
5k views

Trying to SSH in to remote computer but still asking for password

Trying to SSH in to remote computer but still asking for password. I have a number of computers running SElinux and only one of them is giving me a hard time using ssh without the password. I did ...
7
votes
2answers
4k views

How to revoke an ssh certificate (not ssh identity file!)

I've generated an ssh certificate like this: ssh-keygen -f ca_key # generate a ssh keypair for use as a certificate generate a host key ssh-keygen -s ca_key -I cert_identifier -h host_key.pub ...
7
votes
1answer
2k views

SSH Allow Password For One User, Rest Only Allow Public Keys

Is it possible with ssh to allow passwords from a certain user, but deny using passwords for everybody else? Basically I want to allow password auth for user justin but everybody else must use public ...
6
votes
1answer
1k views

Can I SSH into my Amazon EC2 server instance if I don't have .pem file from when instance was created?

I am working with some Amazon EC2 servers that are up and running, and I need to SSH into the servers. I don't have any keys that were generated when the servers were first set up (someone else did it ...
6
votes
3answers
283 views

SSH Key authentication

I can't setup SSH key authentication to login without entering a password, and just using the private key. Here is the sshd_config file of my VPS. # What ports, IPs and protocols we listen for Port ...
6
votes
1answer
117 views

Determine when someone last logged in to a server from a key

I'm trying to track the last time a user logged into a Linux server with a certain key. So user secure has 5 keys in ~/.ssh/authorized_keys, how can I track when each key was used and what IP was used ...
6
votes
1answer
2k views

Choosing the encryption algorithm used by OSX ssh-keygen

I have several users that use SmartCVS on OSX to interact with our CVS repository. We use the cvs :ext: (SSH2) method to access the repository, which is stored on a remote linux system. We use ssh key ...
6
votes
2answers
208 views

Logging in from different computers using SSH keys

Forgive the noob-ness of my question, but I'm taking baby steps. I've read about why it is important to use SSH keys for logging into my server. However it seems to me that this is most useful if you ...
6
votes
4answers
6k views

ssh_exchange_identification: Connection closed by remote host

Firstly, I know that this question has been asked a million times, and I have read everything I can find and still cannot fix the problem. i am encountering this issue when ssh'ing in from my mac to ...
6
votes
1answer
201 views

identifying ssh trusts between multiple servers on a network

The problem: We have many dev/qa/prod RH/Solaris servers with many accounts having ssh trust between them, including between servers in different environments (prod->prod, but also qa->prod). I know ...
6
votes
2answers
650 views

Ubuntu MySQL GUI logins with certificate/key

I will connect to MySQL on ubuntu cloud server everyday with Mysql Administrator and Mysql Query Browser GUI tools and I feel very slow in responding. I know it is possible to connect with ssh ...
5
votes
2answers
941 views

SSH keys: why is id_rsa larger than id_rsa.pub?

My private key (~/.ssh/id_rsa) is a 1766-byte file, but my public key (~/.ssh/id_rsa.pub) is only 396 bytes in length. Why the massive difference? Is it because the private key is encrypted using AES? ...
5
votes
4answers
3k views

OpenSSH on Ubuntu 10.10 (Maverick): should ~/.ssh/authorized_keys file be generated automatically?

I'm setting up public key authentication using this guide: https://help.ubuntu.com/community/SSH/OpenSSH/Keys. The documentation talks about the ~/.ssh/authorized_keys file, but there is no ...
5
votes
2answers
529 views

Which is the maximum number of keys in authorized_keys file?

I'm developing a solution which inserts a big number of SSH-keys into the authorized keys files of my SSH-server. Does anyone know the limit of keys that you can insert into that file? Are we talking ...
5
votes
2answers
172 views

Theoretical situation regarding lost ssh keys

This has not happened to me, yet. But let's assume the following scenario: I copy my public key to the server, and then disable password authentication for ssh. Then, for some unknown reason, the ...
5
votes
5answers
660 views

Sharing public key with ssh

Is it possible to somehow setup an ssh server that doesn't require a username,password or cert to login? If that's not possible, if I were to give all customers the same public key, would each ...
5
votes
2answers
3k views

SSH from PuTTy to Debian “authorized_keys is not a regular file” Error

I cannot connect from my Windows 7 computer using PuTTy to a newly configured Debian Squeeze server using SSH RSA key authentication. I get this error when running SSH in debug mode: User myuser ...
5
votes
3answers
1k views

Is it harmless to use the same ssh private/public keypair from multiple computers?

Whenever I get a new laptop, I copy the public and private ssh keys from the older one. But since I sometimes hold on to the old laptops, I'll be logging into servers and such using the same dsa ...
5
votes
1answer
1k views

CentOS is ignoring my public key

I am trying to connect to my own CentOS server using SSH; I am able to connect fine with a password; I am trying to connect with my public key, but the server does not attempt public key ...
5
votes
3answers
252 views

How to configure ssh client to use private keys automatically

I'm always running ssh with the -i parameter and it's a hassle to always type in the correct key for whatever host I'm connecting to. Is there a config file or something (on Mac) to define which ...
5
votes
4answers
880 views

Why VPN when I can just use SSH keys?

A friend of mine installed VPN on our LAMP development server. Previously, we just used SSH and sometimes SSH public keys to avoid password prompts. My question is, what is the advantage of using ...
5
votes
1answer
1k views

Manage ssh_known_hosts with puppet

I'm new to Puppet (open source version) and have a relatively straightforward question. When I bring up a new host, I'd like the puppetmaster to add the new host's public rsa key to ...
5
votes
5answers
9k views

SSH aborts with Too many authentication failures

I'm attempting to run this simple provisioning script but I'm encountering errors when running vagrant up and then vagrant provision commands. I read that I needed to create a /etc/ansible/hosts file ...
5
votes
5answers
2k views

How can I flush my ssh keys on power management activity?

Using ssh-agent and private keys per the usual. Everything's working as normal. My question regards best practices on flushing keys from ssh-add on activity like sleep, suspend, hibernate, etc. I ...
5
votes
1answer
317 views

One Unix account for several users on GitHub, how does it work?

When we create a repository on GitHub, we can always access it with the address "git@github.com:user/repo" but how does it work behind the scene? ...I mean, there is only one Unix account: "git" ...
5
votes
3answers
7k views

How to set public SSH key for root user on server?

I'm trying to follow Slicehost Document to setup my server. I reached SSH section. I made it as written, but when i logged out from root, i cant access root@IP_ADDRESS -p 30000 again! but i can access ...
5
votes
1answer
459 views

How to blacklist SSH public keys in OpenSSH?

How can I configure OpenSSH (5.9) to reject a given set of public keys? I know I can remove the keys from each respective .ssh/authorized_keys file, but I would like to do it on a server-wide basis. ...
5
votes
4answers
568 views

Any point using Denyhosts for SSH when only RSA key logins are allowed anyway?

Right, so if I can only SSH into my box by having the appropriate RSA keys configured, is there any point in using Denyhosts for SSH as well? Or is Denyhosts only looking at keyboard-interactive / ...
5
votes
9answers
3k views

ssh many users to one home

I want to allow some trusted users to scp files into my server (to an specific user), but I do not want to give these users a home, neither ssh login. I'm having problems to understand the correct ...
5
votes
1answer
556 views

Distribute ssh public keys among hosts

I'm setting up some machines with Ansible and need to enable password less connections between them. I've got a database master and several slaves. For initial replication the slaves need to ssh into ...
5
votes
1answer
411 views

Rsync + public key authentication security

I have read several articles how to automatically backup files with Rsync and public key authentication. All of them are very similar. I just finished setting up everything and everything works fine ...
4
votes
3answers
3k views

SSH: one authorized_keys for multiple service accounts

Is there a way to configure SSH to check a single authorized_keys file for multiple users? I know I can copy the public key into each user's authorized_keys file but for ease of management I'd like an ...
4
votes
3answers
361 views

SSH still asks for password even after adding key to authorized_keys

Here are the steps I did on my local computer: ssh-keygen -t rsa cat ~/.ssh/id_rsa | ssh root@remotehost.com -p 1234 "cat > ~/.ssh/authorized_keys" When I do a ssh root@remotehost.com -p 1234 it ...