Questions tagged [ssh]

Secure Shell (SSH) is a protocol primarily for encrypted shell connections. This tag is also used for questions about sshd and openssh, the two standard applications for using SSH.

Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices. Used primarily on Linux and Unix based systems to access shell accounts, SSH was designed as a replacement for Telnet and other insecure remote shells, which send information, notably passwords, in plaintext, rendering them susceptible to packet analysis.

It's important to note that there are two versions of SSH (1 and 2), and that version 1 is no longer considered secure, and should be replaced by version 2 where ever possible.

More information, including the more notable SSH-1 vulnerabilities, can be found at the Wikipedia page for SSH.

8969 questions
220
votes
9 answers

How to check sshd log?

I have Ubuntu 9.10 installed with sshd and I can successfully connect to it using login and password. I have configured an RSA key login and now have "Server refused our key" as expected. Ok, now I want to check sshd log in order to figure out a…
grigoryvp
  • 3,795
84
votes
14 answers

ssh connection takes forever to initiate, stuck at "pledge: network"

Connection to one of my servers using ssh takes more than 20 seconds to initiate. This is not related to LAN or WAN conditions, since connection to itself takes the same (ssh localhost). After connection is finally establised, it is super fast to…
M-Jack
  • 1,376
  • 2
  • 11
  • 16
77
votes
4 answers

How do I connect to ssh with a different public key?

I have two public keys, one for some servers and one for others. How do I specify which key to use when connecting to a server?
rid
  • 981
74
votes
9 answers

Is there a way to avoid SSH typing delay?

Can I tell SSH to send the data only after pressing enter or tab, and not after each individual keypress?
72
votes
8 answers

Securely add a host (e.g. GitHub) to the SSH known_hosts file

How can I add a host key to the SSH known_hosts file securely? I'm setting up a development machine, and I want to (e.g.) prevent git from prompting when I clone a repository from github.com using SSH. I know that I can use StrictHostKeyChecking=no…
65
votes
4 answers

How to manage my .ssh/known_hosts file

I run an Ubuntu desktop with a bunch of virtual servers in Virtual Box to test stuff out, etc. In the past I have also been connecting to other kinds of remote VPS Linux boxes. Currently my .ssh/known_hosts file has a whole bunch of keys in it, most…
Luke
  • 3,856
  • 8
  • 36
  • 42
57
votes
2 answers

ServerAliveCountMax in SSH

What does the ServerAliveCountMax in SSH actually do? I am trying to ensure that when I connect to my server via SSH that the connection remains open for a long period of time instead of the connection dying after a short period of inactivity. This…
53
votes
6 answers

Is it possible to run sshd as a normal user?

I'm aiming to start up a second sshd instance on a non-privileged port (e.g. 2222) with my own configuration file. Obviously, the sshd process can't setuid so logging in as users other than the one who is running the sshd daemon is clearly…
Bo Jeanes
  • 1,530
48
votes
6 answers

SSH session drops - Does the command continue executing?

If I was running a command before the SSH connection was dropped, will the command continue executing?
Miko
  • 1,799
  • 4
  • 23
  • 28
47
votes
12 answers

Can't get SSH public key authentication to work

My server is running CentOS 5.3. I'm on a Mac running Leopard. I don't know which is responsible for this: I can log on to my server just fine via password authentication. I've gone through all of the steps for setting up PKA (as described at…
Trey Parkman
40
votes
3 answers

How can I match a CIDR range for an SSH config host entry?

I'm looking for a way to use specific CIDR blocks to match hosts in the SSH client configuration (usually ~/.ssh/config). For example, I have an entry to forward all traffic through a bastion host if the IP falls into a certain range, let's say…
fazy
  • 800
40
votes
3 answers

Suppressing ssh banner from OpenSSH client

I am logging into a server which has an ssh banner set. I would like to suppress it (especially for non-interactive use). I do not have access to the server sshd_config. The best solution I have found so far is to set the LogLevel ERROR option on…
37
votes
2 answers

How can one send commands to the "inner" ssh session?

Picture a scenario where I'm logged into a server (which we'll call "Wallace") from my local machine, and from there I ssh into another server (which we'll call "Gromit"): laptop ---ssh---> Wallace ---ssh---> Gromit Then the ssh session from…
iconoclast
  • 1,830
35
votes
2 answers

What options can be put into a SSH authorized_keys file?

I found this article on options that can be put before a key in the authorized_keys file. I was wondering though, are there more? Options listed in the article…
mozillalives
  • 1,033
33
votes
2 answers

Does known_hosts support comments?

I find the ~/.ssh/known_hosts file a bit hard to read. It'd help if I could add comments to it so I thought I should ask if that's possible.
1
2 3
35 36