Questions tagged [ssh]

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

Filter by
Sorted by
Tagged with
1141 votes
25 answers
1.4m views

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 ...
jrdioko's user avatar
  • 12.8k
751 votes
15 answers
316k views

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 ...
erwan's user avatar
  • 7,631
520 votes
15 answers
800k views

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 ...
Cerin's user avatar
  • 9,142
474 votes
18 answers
466k views

An SSH tunnel via multiple hops

Tunneling data over SSH is pretty straight-forward: ssh -D9999 [email protected] sets up port 9999 on your localhost as a tunnel to example.com, but I have a more specific need: I am working ...
Mala's user avatar
  • 7,358
466 votes
4 answers
159k views

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. ...
dlamblin's user avatar
  • 10.7k
462 votes
18 answers
839k views

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 ...
Sabrina's user avatar
  • 5,373
438 votes
7 answers
1.3m views

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’...
Andreea's user avatar
  • 4,491
348 votes
19 answers
314k views

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 ...
Peltier's user avatar
  • 6,294
304 votes
15 answers
373k views

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 [email protected]:.ssh/...
Gabriel's user avatar
  • 3,675
302 votes
7 answers
484k views

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? ...
TheOneTeam's user avatar
  • 5,287
292 votes
11 answers
880k views

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 ...
Adam Matan's user avatar
  • 8,380
254 votes
8 answers
189k views

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 ...
Kzqai's user avatar
  • 2,878
253 votes
12 answers
137k views

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/...
Joe Casadonte's user avatar
252 votes
4 answers
449k views

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's user avatar
  • 3,561
250 votes
8 answers
203k views

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:...
Trevor Rudolph's user avatar
246 votes
8 answers
276k views

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 ...
shantanuo's user avatar
  • 2,763
212 votes
7 answers
203k views

scp between two remote hosts from my (third) pc

I have two remote hosts. host1-> 10.3.0.1 host2-> 10.3.0.2 Both run an ssh server. The ssh server listens on port 22 in host1 and on port 6969 in host2. Now, using my local machine, I need to copy ...
uwais ibrahim's user avatar
210 votes
9 answers
207k views

How do I configure SSH so it doesn't try all the identity files automatically?

I have been putting my ssh identity files inside my ~/.ssh/ folder. I have probably about 30 files in there. When I connect to servers, I will specify the identity file to use with something like ...
cwd's user avatar
  • 18.1k
209 votes
4 answers
199k views

How do you run a SSH server on Mac OS X?

How do you run a ssh server on Mac OS X?
Pablo Fernandez's user avatar
198 votes
13 answers
1.2m views

How do I edit text files in the Windows command prompt?

On Unix I'd just use vi, but I don't know what the command is on Windows. I am actually trying to edit files over SSH with Windows Server 2008.
Casebash's user avatar
  • 7,477
195 votes
5 answers
216k views

What's the difference between SCP and SFTP?

Usually, I use the scp command to transfer files on *nixes. What's the difference between SFTP and SCP? Don't they both work on SSH?
nos's user avatar
  • 4,369
194 votes
10 answers
241k views

How do I set up SSH so I don't have to type my password?

How do I set up SSH so I don't have to type my password when connecting to a host?
188 votes
16 answers
1.9m views

How do I fix a "cannot open display" error when opening an X program after ssh'ing with X11 forwarding enabled?

After launching the X11 app (XQuartz 2.3.6, xorg-server 1.4.2-apple56) on my Mac (OS X 10.6.8), opening an terminal in X11 and running xhost +, I then ssh -Y to my Ubuntu 10.04 VM (running on VMware ...
Daryl Spitzer's user avatar
174 votes
2 answers
123k views

How can I tell how many bits my ssh key is?

I already created an ssh key for myself sometime in the past. I don't remember "how many bits" it is. How can I tell? I'm wondering because I'm using hosting at nearlyfreespeech.net and their faq ...
yairchu's user avatar
  • 1,915
171 votes
7 answers
112k views

Don't add hostkey to known_hosts for SSH

I want to connect to a host via SSH but I don't want the hostname to be added to my ~/.ssh/known_hosts. How can I do that?
Albert's user avatar
  • 6,661
167 votes
3 answers
253k views

Howto force ssh to use a specific private key?

With ssh -i <private key filename> you can instruct ssh to use an extra private key to try authentication. The documentation is not clear on how to explicitly use only that key.
Herman van Rink's user avatar
161 votes
10 answers
194k views

How to use Mac OS X Keychain with SSH keys?

I understand that since Mac OS X Leopard the Keychain has supported storing SSH keys. Could someone please explain how this feature is supposed to work. I have some RSA keys that I've generated ...
John Topley's user avatar
  • 1,758
157 votes
7 answers
270k views

How can I tunnel all of my network traffic through SSH?

Whenever I'm using the internet from an insecure location (such as public wifi) I like to use an ssh tunnel (ssh -D port host) to ensure my traffic can't be sniffed. Unfortunately, there seem to be ...
Jeremy's user avatar
  • 1
156 votes
9 answers
415k views

how to avoid being asked "Enter passphrase for key " when I'm doing ssh operation on a remote host?

I'm ssh into a remote host (linux, fedora) and I want to do ssh operation(git with bitbucket) there. There is ssh-agent running on that machine, $ ps -e|grep sh-agent 2203 ? 00:00:00 ssh-...
lily's user avatar
  • 1,835
147 votes
9 answers
231k views

How do I make Bash my default shell on Ubuntu?

I have a .bash_profile in my home directory, but it isn't getting run on login. If I do the following, then things seem to be as I expect: ssh myhost bash source ~/.bash_profile But normally that ...
James A. Rosen's user avatar
147 votes
6 answers
152k views

SHA256 ssh fingerprint given by the client but only md5 fingerprint known for server

When connecting to a new/unknown server (with recent OpenSSH), for example: ssh example.com You get the fingerprint like below: The authenticity of host 'example.org (192.0.2.42)' can't be ...
JonnyJD's user avatar
  • 3,643
147 votes
11 answers
218k views

When ssh'ing, how can I set an environment variable on the server that changes from session to session?

When I ssh into a server, how can I pass an environment variable from the client to the server? This environment variable changes between different invocations of ssh so I don't want to overwrite $...
Ross Rogers's user avatar
  • 4,517
146 votes
6 answers
242k views

How to prevent SSH from disconnecting if it's been idle for a while

I have a ssh connection to a machine which gets disconnected by that machine after 30 minutes of no user input. However, if I start something like top, the connection stays alive. Since this is a ...
Isaac's user avatar
  • 1,874
140 votes
24 answers
242k views

Why is my SSH login slow?

I'm seeing delays in SSH Logins. Specifically, there are 2 spots where I see a range from instantaneous to multi-second delays. Between issuing the ssh command and getting a login prompt and between ...
Peter Lyons's user avatar
  • 1,862
136 votes
3 answers
182k views

Where does Putty store known_hosts information on Windows?

How do I tell if Putty already knows about and has cached credentials for specific ssh servers? Another way to ask this question is what is the Windows/Putty equivalent of a unix/ssh known_hosts file?...
Hitesh's user avatar
  • 3,071
132 votes
8 answers
1.1m views

How can I resolve the error "cannot execute binary file"?

When I login using SSH, all I can see is this... -bash: /usr/bin/id: cannot execute binary file -bash: [: : integer expression expected I couldn't do anything in here. Commands such as halt, ...
superuser's user avatar
  • 4,077
132 votes
7 answers
419k views

SSH: The authenticity of host <host> can't be established

What does this message mean? Is this a potential problem? Is the channel not secure? Or is this simply a default message that is always displayed when connecting to a new server? I am used to ...
Steven Lu's user avatar
  • 3,668
130 votes
14 answers
147k views

How to force GPG to use console-mode pinentry to prompt for passwords?

Using gpg from a console-based environment such as ssh sessions fails because the GTK pinentry dialog cannot be shown in a SSH session. I tried unset DISPLAY but it did not help. The GPG command line ...
ccpizza's user avatar
  • 7,763
128 votes
8 answers
67k views

Forward SSH traffic through a middle machine

SSH tunneling is very confusing to me. I am wondering if I can do this in Linux. I have 3 machines.. A. My local machine at home. B. Machine at work that I can SSH into (middle man). C. My desktop ...
user avatar
127 votes
5 answers
229k views

How can I SSH into "Bash on Ubuntu on Windows 10"?

I have Windows 10 Anniversary Edition with "Bash on Ubuntu on Windows" installed and working. I'd like to be able to SSH into this Ubuntu instance, but although I have openssh-server installed and ...
Mick's user avatar
  • 1,951
117 votes
5 answers
70k views

Is it ok to share private key file between multiple computers/services?

So we all know how to use public key/private keys using SSH, etc. But what's the best way to use/reuse them? Should I keep them in a safe place forever? I mean, I needed a pair of keys for accessing ...
Behrang Saeedzadeh's user avatar
115 votes
3 answers
638k views

How to upload local file to server through Linux terminal

I am trying to upload local files to server by using Putty or SSH but not getting upload there. Is there any direct method to upload file from local to server from Linux terminal without using FTP ...
Sanjeev Kumar Goswami's user avatar
112 votes
3 answers
176k views

How can I change the directory that ssh-keygen outputs to?

I want to run a command like: ssh-keygen -t rsa -b 4096 -C "[email protected]" My understanding is that ssh-keygen outputs to the home directory. I'm working on a networked computer using Git ...
Phlox Midas's user avatar
  • 1,223
111 votes
6 answers
296k views

Downloading Folders to my Local via SSH

I am learning SSH as it seems there are no good SSH GUIs for Macs. I know how to make db dumps, cruise through the directories, etc, but the one last piece of the puzzle I need to learn is how to ...
Zach Smith's user avatar
  • 1,235
108 votes
12 answers
251k views

List open SSH tunnels

I use a lot of SSH tunnels to various servers on my linux machine (for tunnelling to databases, web servers etc) and it would be really handy to view a list of current open tunnels via a shell script. ...
James Frost's user avatar
  • 1,183
105 votes
9 answers
197k views

UDP traffic through SSH tunnel

The title pretty much sums it up. I would like to send UDP traffic through a SSH tunnel. Specifically, I need to be able to send UDP packets through the tunnel and have the server be able to send ...
heavyd's user avatar
  • 63.7k
98 votes
4 answers
55k views

Are GPG and SSH keys interchangable?

I want to generate an RSA key in GPG and use it in SSH login. Is this even possible? If so, how? edit: see @wwerner's answer, I didn't try it but it seems to be the current solution (as of 2018)
destan's user avatar
  • 1,137
97 votes
18 answers
196k views

Linux "Top" command for Windows Powershell?

I am looking for a PowerShell cmdlet that can provide similar functionality to the Linux Top app. Something that refreshes at some given interval and displays the process list with CPU % util. I have ...
user avatar
97 votes
2 answers
173k views

How do I clear out the ssh-agent entries (on Mac OS X )?

I'm running Mac OS X, and it appears that after SSHing to several machines, using identity files, my 'ssh-agent' builds up a lot of identity / keys and then sometimes offers too many to a ...
cwd's user avatar
  • 18.1k
97 votes
6 answers
144k views

How to make git not prompt for passphrase for ssh key?

I'm using git bash and I setup ssh key using ssh-keygen and each time I do something with a repo git ask me for passphrase for /c/Users/jankiewj/.ssh/id_rsa. Is there a way to disable that passphrase. ...
jcubic's user avatar
  • 2,943

1
2 3 4 5
213