Questions tagged [ssh]

Secure Shell; a network protocol that allows data transfer over a secure channel between two networked devices.

SSH is a network protocol that allows two networked devices to exchange data on a secure channel. SSH was designed as a replacement for the insecure and protocols that send data (including authentication) as plain text.

SSH is most commonly used in Unix-derived systems such as OS X and Linux, mostly already pre-installed. On Microsoft Windows, an SSH client such as PuTTY can be used.

Related tags:

  • , one of the most popular implementations of SSH used today
  • , the SSH daemon which responds to incoming requests
  • , which provides a secure way of storing the passphrase of the private key

Important questions:

Related links:

10440 questions
1106
votes
25 answers

How to tell git which private key to use?

ssh has the -i option to tell which private key file to use when authenticating: -i identity_fileSelects a file from which the identity (private key) for RSA or DSA authentication is read.  The default is ~/.ssh/identity for protocol…
jrdioko
  • 12,445
  • 5
  • 27
  • 26
738
votes
14 answers

macOS keeps asking my ssh passphrase since I updated to Sierra

It used to remember the passphrase, but now it's asking it to me each time. I've read that I need to regenerate the public key with this command, which I did: ssh-keygen -y -f id_rsa > id_rsa.pub but it didn't fix anything. How can I make macOS…
erwan
  • 7,501
  • 3
  • 9
  • 6
512
votes
14 answers

How to fix warning about ECDSA host key

I'm trying to setup password-less SSH on an Ubuntu server with ssh-copy-id myuser@myserver, but I'm getting the error: Warning: the ECDSA host key for 'myserver' differs from the key for the IP address '192.168.1.123' What's causing this, and how…
Cerin
  • 8,746
  • 16
  • 54
  • 65
469
votes
18 answers

An SSH tunnel via multiple hops

Tunneling data over SSH is pretty straight-forward: ssh -D9999 username@example.com sets up port 9999 on your localhost as a tunnel to example.com, but I have a more specific need: I am working locally on localhost host1 is accessible to…
Mala
  • 7,288
  • 11
  • 35
  • 38
458
votes
4 answers

What is randomart produced by ssh-keygen?

When you generate a key, you get "randomart" from newer versions of OpenSSH. I am unable to find an explanation of why, and what I'm supposed to use it for. Generating public/private rsa key pair. The key fingerprint…
dlamblin
  • 10,553
  • 8
  • 45
  • 53
436
votes
18 answers

Windows SSH: Permissions for 'private-key' are too open

I've OpenSSH 7.6 installed in Windows 7 for testing purposes. SSH client & server work just fine till I tried to access one of my AWS EC2 box from this windows. It seems like I need to change the permission on the private key file. This can be…
Sabrina
  • 5,083
  • 8
  • 15
  • 25
432
votes
7 answers

How do I exit an SSH connection?

I’m connecting to a server via SSH to send a message to a socket server using a command like: ssh 181.169.1.2 -p 5566 After the connection is established and I write the message and send it I can’t exit the text mode. I’m only allowed to enter…
Andreea
  • 4,431
  • 3
  • 15
  • 9
337
votes
19 answers

How to reliably keep an SSH tunnel open?

I use an SSH tunnel from work to go around various idotic firewalls (it's ok with my boss :)). The problem is, after a while the ssh connection usually hangs, and the tunnel is broken. If I could at least monitor the tunnel automatically, I could…
Peltier
  • 6,094
  • 8
  • 36
  • 62
299
votes
15 answers

Too many authentication failures for *username*

I have a hostgator account with ssh access enabled. When trying to upload the generated .pub key file with this command: rsync -av -e "ssh -p2222" /home/user/.ssh/key.pub username@111.222.33.44:.ssh/authorized_keys I keep getting: Received…
Gabriel
  • 3,615
  • 5
  • 27
  • 24
285
votes
7 answers

What is a SSH key fingerprint and how is it generated?

I always find that I get this message when I ssh into a new machine: 12:f8:7e:78:61:b4:bf:e2:de:24:15:96:4e:d4:72:53 What does it stand for? Will every machine have the same fingerprint every time? How are these fingerprints generated? What…
TheOneTeam
  • 5,107
  • 7
  • 36
  • 46
271
votes
11 answers

Remove key from known_hosts

I built several virtual machines during the last few weeks. The problem is, the .ssh/known_hosts gives me the Man in the middle warning. This happens because another fingerprint is associated with the virtual machine IP. In the .ssh/known_hosts…
Adam Matan
  • 8,090
  • 17
  • 59
  • 84
252
votes
8 answers

Way to avoid ssh connection timeout & freezing of GNOME Terminal

When I connect via ssh to certain servers, it timeouts and "freezes" the terminal (doesn't accept input, doesn't disconnect, can't Ctrl-C to kill the ssh process or anything). This is in Ubuntu's gnome-terminal though it seems to be pausing the…
Kzqai
  • 2,858
  • 3
  • 20
  • 16
248
votes
4 answers

How to convert .ppk key to OpenSSH key under Linux?

I know that is possible to convert .ppk under puttygen in Windows, but how to do that on Linux? Is this possible ?
marioosh
  • 3,521
  • 6
  • 26
  • 30
244
votes
8 answers

How to make an SSH tunnel publicly accessible?

Referring back to this question, I am executing the below via OpenSSH (Client: Mac OS X 10.6 | Server: Linux Mint), however the port that is being tunneled is not working publicly: ssh -R 8080:localhost:80 -N root@example.com The purpose is so the…
Trevor Rudolph
  • 2,581
  • 3
  • 16
  • 14
244
votes
12 answers

Is there a way for one SSH config file to include another one?

In case it matters: OS: Ubuntu 10.04 SSH: OpenSSH_5.3p1 Debian-3ubuntu5 I'd like one SSH config file to include another one. The use case would be to define whatever I want in my default .ssh/config file and then pre-pend a couple of extra things…
Joe Casadonte
  • 5,373
  • 5
  • 25
  • 38
1
2 3
99 100