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.

8868 questions
55
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…
John Crawford
  • 2,005
  • 3
  • 15
  • 9
54
votes
6 answers

Is there a way to permanently set the font and window size in PuTTY?

When I log in with PuTTY, I always have to: change settings appearance font change 8 resize window so that I can see enough text to work with the log files. I don't see where I can save these settings to my saved session. Is this…
Edward Tanguay
  • 1,209
  • 4
  • 22
  • 31
54
votes
16 answers

Stop ssh login from printing motd from the client?

I've got SSH passwordless set up, however it prints the MoTD when it logs in. Is there anyway to stop that happening from the client side? I've tried ssh -q but that doesn't work. I don't want to use ~/.hushlogin nor do I want to change the server…
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
54
votes
7 answers

Is it okay to use a SSH key with an empty passphrase?

When I first learned how to make ssh keys, the tutorials I read all stated that a good passphrase should be chosen. But recently, when setting up a daemon process that needs to ssh to another machine, I discovered that the only way (it seems) to…
mozillalives
  • 1,003
  • 2
  • 9
  • 9
54
votes
11 answers

SSH via PowerShell

Is it possible to open an SSH session in PowerShell? Currently I use PuTTY but it would be nice if that were not required.
nw.
  • 723
  • 2
  • 8
  • 12
53
votes
5 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,520
  • 2
  • 13
  • 17
53
votes
3 answers

SSH connection lost during server upgrade - How to reconnect to process?

So, I was performing an Ubuntu Server upgrade from 11.04 to 11.10. I forgot about it in the background, and my SSH client timed out and disconnected (putty on Windows, go figure). The last thing on my terminal was a question about keeping an old…
Stephen Melrose
  • 5,905
  • 5
  • 25
  • 22
53
votes
22 answers

Why change default ssh port?

I've noticed that a lot of admins change the default ssh port. Is there any rational reason to do so?
sheerun
  • 633
  • 1
  • 5
  • 5
53
votes
7 answers

Force SSH to use a specific shell

Is there any way to force SSH to use a particular shell on the remote end, regardless of what the user's default shell is? I've tried solutions akin to: ssh host.domain.com /bin/bash -c 'complicated, multi-line command' but unfortunately the…
plinehan
  • 675
  • 1
  • 5
  • 6
53
votes
6 answers

Stop ssh client from offering all the public keys it can find?

Like most sysadmins I use openssh all the time. I have about a dozen ssh keys, I like to have a different ssh key for each host. However this causes a problem when I am connecting to a host for the first time, and all I have is a password. I want to…
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
52
votes
8 answers

Can I create SSH to tunnel HTTP through server like it was proxy?

Say I have a server and client. I need to create connection from client to a website through server like it was proxy. Is it possible to do this using a SSH tunel, or do I have to install some proxy service to the server?
Jakub Arnold
  • 1,744
  • 10
  • 26
  • 33
51
votes
14 answers

Preventing brute force attacks against ssh?

What tool or technique do you use to prevent brute force attacks against your ssh port. I noticed in my Security logs, that I have millions of attempts to login as various users through ssh. This is on a FreeBSD box, but I imagine it would be…
grieve
  • 1,547
  • 3
  • 17
  • 18
50
votes
2 answers

Use a specific forwarded key from SSH-agent?

Let's say I have a key for Github, along with other keys. I've added lots of keys to my ssh agent (ssh-add -L returns lots of lines) at my home computer A. In my .ssh/config I have set up which key to use with which host, so e.g. ssh -T -vvv…
danmichaelo
  • 602
  • 1
  • 5
  • 8
50
votes
7 answers

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 first line / entry / publickey hack with awk: awk…
childno͡.de
  • 642
  • 1
  • 5
  • 14
50
votes
7 answers

Is there a name based virtual host SSH reverse proxy?

I've grown quite fond of HTTP reverse proxies in our development environment and found the DNS based virtual host reverse proxy quite useful. Having only one port (and the standard one) open on the firewall makes it much easier for management. I'd…
ahanson
  • 1,704
  • 2
  • 16
  • 21