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

learn more… | top users | synonyms

253
votes
5answers
55k 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. ...
219
votes
10answers
210k 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.  ...
184
votes
6answers
125k 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 ...
181
votes
9answers
149k views

ssh tunnel via multiple hops

Tunneling data over ssh is pretty straight-forward: ssh -D9999 username@foreignhost.com sets up port 9999 on your localhost as a tunnel to foreignhost.com, but I have more specific need: I am ...
134
votes
11answers
143k views

Too many authentication failures for *username*

I have a hostgator account with ssh access enabled and 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:....
129
votes
13answers
84k 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 ...
116
votes
10answers
82k 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?
113
votes
3answers
146k 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 ?
110
votes
2answers
74k views

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

How do you run a ssh server on Mac OS X?
110
votes
4answers
101k 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?
82
votes
5answers
36k 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 ...
81
votes
4answers
27k 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 ...
80
votes
9answers
76k 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 ...
76
votes
9answers
176k 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 ...
73
votes
6answers
204k 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 ...
70
votes
6answers
71k 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 ...
70
votes
6answers
78k 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 ...
67
votes
8answers
100k 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 ...
62
votes
4answers
46k views

How to make ssh tunnel open to public?

Well, referring back to this question, I am running the command ssh -R 8080:localhost:80 -N root@example.com on a Mac. Yet the port that is being tunneled is not working publicly. I am running such ...
62
votes
3answers
33k 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 ...
60
votes
1answer
25k 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 ...
58
votes
4answers
73k 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 ...
57
votes
13answers
61k views

Top causes of slow ssh logins

I'd love for one of you smart and helpful folks to post a list of common causes of delays during an ssh login. Specifically, there are 2 spots where I see a range from instantaneous to multi-second ...
56
votes
1answer
53k 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?...
55
votes
8answers
18k 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/...
50
votes
7answers
20k 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?
50
votes
17answers
87k views

Map remote drive in Windows over SSH

Does anyone know of a good (hopefully free) tool that can be used to map a Linux server accessible over SSH/SCP as a Windows network drive? EDIT: SFTP not supported EDIT2: Windows File Sharing/Samba ...
49
votes
3answers
61k 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?...
49
votes
9answers
324k 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 ...
49
votes
11answers
184k views

PuTTY Network Error: Software caused connection abort

I have a strange problem: When I'm using PuTTY with SSH connecting to a Linux server hosted in VMware on my local Windows 7, I often get the error saying "Network error: Software caused ...
48
votes
6answers
55k 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 ...
46
votes
5answers
56k 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 $...
45
votes
5answers
26k views

How do I configure SSH so it dosen'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 ...
45
votes
11answers
21k views

Sharing the same `ssh-agent` among multiple login sessions

Is there a convenient way to ensure that all logins from a given user (ie me) use the same ssh-agent? I hacked out a script to make this work most of the time, but I suspected all along that there ...
44
votes
2answers
154k views

How do I SCP from remote machine to local machine when I am outside of my home network?

While I understand how to scp files to and from my server from within my home network, how can I scp a file from my server to my local machine when I am on the outside, say at Starbucks? While I am ...
44
votes
3answers
10k 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) like: ssh example.com You get the fingerprint like that: The authenticity of host 'example.org (192.0.2.42)' can't be established. RSA ...
43
votes
5answers
75k views

how do I change the colour scheme on PuTTY?

I'm using PuTTY to SSH from my PC at home to Linux computers at work, but some of the text (folder names) is dark blue on black, which is almost impossible to read. How do I change the colour-scheme? ...
43
votes
11answers
13k views

How do you get screen to automatically connect to the current ssh-agent when re-attaching to an existing screen?

If you start a screen session while ssh-agent is running (from ssh -A agent forwarding), accessing ssh-agent works fine. However, if you detach from that session, log out, log in again (with ssh-agent ...
41
votes
2answers
57k views

Can I create an SSH user which can access only certain directory?

I have a Virtual Private Server which I can connect to using SSH with my root account, being able to execute any linux command and access all the disk area, obviously. I would like to create another ...
40
votes
1answer
12k views

How do I extract fingerprints from .ssh/known_hosts?

My laptop has a well-populated ~/.ssh/known_hosts file. I'd like to leverage that when connecting to remote hosts from my desktop, since tracking down the fingerprints can be a real chore. However, I ...
40
votes
2answers
23k views

Does Heartbleed affect ssh keys?

Does the recent Heartbleed bug affect the ssh keys I've generated and use to push/pull code with Github, Heroku, and other similar sites? Do I need to replace the keys I've been using?
39
votes
3answers
18k 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?
36
votes
6answers
20k views

Linux: Continuously synchronize files, one way

Scenario: An IDE is set up on a Linux desktop box, editing PHP files locally. Every time I save a file, I want this change to appear on the linux server where Apache is running. The server has ssh (...
36
votes
4answers
88k 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 ...
35
votes
6answers
226k 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.
35
votes
5answers
257k 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, ...
33
votes
5answers
10k views

SSH with authorized_keys to an Ubuntu system with encrypted homedir?

I recently set up a new server with Ubuntu karmic 9.10, and when I created my home directory I chose to make it encrypted. Now, after loading my authorized_keys file into ~/.ssh, it isn't recognized ...
33
votes
3answers
45k views

SSH: execute sudo command

I have an interactive shell script, that at one place needs to ssh to another machine (Ubuntu based) and execute something as root (the user should enter his password, but the remote command should ...
33
votes
2answers
15k views

Is it a bad idea to use the same private ssh key on multiple computers?

I recently bought a laptop from which I need to access the same remote hosts that I do from my desktop. It occurred to me that it might be possible to simply copy the private key file from my desktop ...
32
votes
4answers
24k views

How to copy a file without using scp inside an ssh session?

I have logged on to a system with ssh and there is no scp present on both the systems. How to copy a file without using the scp program.