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:

10006 questions
1021
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
  • 11,565
  • 5
  • 26
  • 26
701
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,131
  • 3
  • 9
  • 6
446
votes
17 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,038
  • 11
  • 35
  • 38
440
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,301
  • 8
  • 44
  • 53
431
votes
13 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
  • 7,759
  • 16
  • 49
  • 64
399
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,101
  • 3
  • 14
  • 9
378
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
  • 4,453
  • 7
  • 14
  • 23
317
votes
18 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
  • 5,794
  • 7
  • 35
  • 60
295
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,575
  • 5
  • 26
  • 24
263
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
  • 4,867
  • 6
  • 35
  • 44
251
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,848
  • 3
  • 19
  • 16
239
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,401
  • 6
  • 25
  • 28
237
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,501
  • 3
  • 15
  • 14
234
votes
8 answers

How can I avoid SSH's host verification for known hosts?

I get the following prompt everytime I try to connect a server using SSH. I type "yes", but is there a way to aovid this? The authenticity of host '111.222.333.444 (111.222.333.444)' can't be established. RSA key fingerprint is…
shantanuo
  • 2,623
  • 3
  • 20
  • 20
233
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
  • 7,570
  • 16
  • 58
  • 82
1
2 3
99 100