Questions tagged [ssh-keys]

an authorization mechanism for SSH involving public-key cryptography.

SSH keys are an authorization mechanism for SSH involving public-key cryptography. It consists of

  • A private/public key pair generated by a utility like ssh-keygen.
  • A configured (in /etc/ssh/sshd_config) SSH daemon that allows public key authentication.
  • A configured user account that has the public key copied to ~/.ssh/authorized_keys.
792 questions
3
votes
1 answer

Deleted authorized_keys from EC2 but still have PPK file and I'm connected

I just deleted my full ec2-user/.ssh/ folder and I want to recover the keys so I can access my EC2 server without stopping and starting it. I have on my computer a PPK file that has something like "Private-Lines" so I'm guessing it has both private…
AlfaTeK
  • 275
  • 3
  • 12
3
votes
2 answers

sshd: logging client's public key

I need to run an SSH server and log the IP & public key of any client that attempts to connect (without actually granting access). The use case is this: I deploy this web app to a remote host that, during the build process, fetches some dependencies…
sstur
  • 133
  • 3
3
votes
1 answer

Is rbash secure if user login and ssh passwords are disabled?

I've got a server that I want to use as an SSH gateway for remote and local port forwarding. I don't want arbitrary commands to be able to be executed on it, only my scripts. I keep reading about how restricted shells are easy to break out of, but…
Ivan X
  • 131
  • 4
3
votes
1 answer

How to set up Git on remote instance using keys from local machine?

I have a setup where I can ssh into my remote server (ie a Google Compute instance) from my local machine. I used to be able to clone, push, and pull from a repository on my remote instance without adding any keys to my remote instance, nor adding…
modulitos
  • 335
  • 1
  • 3
  • 16
3
votes
1 answer

Multiple SSH keys per user on the server

Say I run a server which accepts SSH connections, and being a wise person, I use SSH keys instead of passwords to connect to it. There is one user, webmaster, which has access to and controls the website-related directories and programs. Whenever I…
IQAndreas
  • 1,550
  • 2
  • 20
  • 39
3
votes
3 answers

Disallow ssh keys without passphrase

I'm currently disabling password authentication on all my ssh servers (good idea of the day!). Some of my servers are shared with other people and I want to force them to use a ssh key with a passphrase. Is it possible to disallow ssh login for ssh…
Cramix
  • 115
  • 10
3
votes
4 answers

can't force ssh to use a particular key

I have tried to specify the key to be used but for some reason ssh still uses a different key as see below $ cat ~/.ssh/config Host BitBucket HostName bitbucket.org IdentityFile ~/.ssh/id_rsa $ ssh -v…
CuriousMind
  • 185
  • 1
  • 8
3
votes
1 answer

Best approach to generate and use ssh key pairs

New to ServerFault, but have been on StackOverflow for a few months and loving it. I work on a daily basis on 5 servers I have been setting up for some time now. These servers are all AIX 7.1, and are quite similar, running all different…
James
  • 131
  • 2
3
votes
2 answers

Ssh-add and contacting server unsuccessfully

I forgot how to do this procedure. I did on OSX 10.9.1 run ssh-keygen in my server moved the private-key id_rsa to my laptop's $HOME/.ssh/id_rsa, removed the private key id_rsa from my server create the following $HOME/.ssh/config in my…
3
votes
1 answer

SSH key-based authentication best practice

One of the security processes that we are thinking of changing is the way we allow users to access our servers. We have about 20 web servers where the only access is SSH and at the moment we use password authentication. With key-base authentication…
Grimlockz
  • 325
  • 1
  • 2
  • 11
3
votes
4 answers

Why is SSHD hanging at "Server accepts key"

I've been ssh'ing to this box without problem for a year using public-key authentication. No changes have been made to the client or server's ssh config. Now, ssh connections never complete or fail, they just hang. The following is the debug…
JivanAmara
  • 171
  • 1
  • 6
3
votes
1 answer

SSH not working over VPN only

EDIT: the SSH public key setup is a red herring. I actually cannot SSH to any boxes over Junos Pulse VPN, even ones where I don't have my SSH keys stored for password-less login. I have an SSH public key setup on a UNIX box I routinely SSH to at…
mattacular
  • 133
  • 1
  • 1
  • 6
3
votes
2 answers

Block passphraseless ssh keys

Is there an sshd config command to block keys that have blank or empty passphrases in them? I'd like to limit ssh access to people with passwords without having passwords stored on servers.
3
votes
1 answer

ssh host key management between ha hosts

We have a setup with 2 Redhat-based servers which are both ha hosts behind a virtual ip. 192.168.0.3 dataserver (virtual ip) 192.168.0.1 dataserver_ha1 (physical server) 192.168.0.2 dataserver_ha2 (physical server) using drdb and heartbeat it is…
mbubb
  • 31
  • 3
3
votes
1 answer

Security issue with ssh on Debian server

I have setup Debian Squeeze on an old laptop to serve as a testbed. I have installed OpenSSH and edited /etc/ssh/sshd_config to use ssh keys and disallow password authentication. I am able, however, to login with a password via serFISH.com. On…
Andy
  • 31
  • 1