SSH, otherwise known as "Secure Shell", is a method for securely connecting to a remote computer.

learn more… | top users | synonyms (1)

102
votes
11answers
75k views

How to keep processes running after ending ssh session?

Let's say I launch a bunch of processes from a ssh session. Is it possible to terminate the ssh session while keeping those processes running on the remote machine?
88
votes
3answers
22k views

How can I break out of ssh when it locks?

I frequently ssh into my box at home from school, but usually when I change classes and my computer suspends, the pipe will be broken. However, ssh simply locks up - Ctrl+c, Ctrl+z and Ctrl+d have no ...
59
votes
8answers
66k views

How can I set up password-less SSH login?

I want to be able to login to a remote via ssh without having to enter the password all the time. How do I set it up? Is a different command required to execute a password-less session?
56
votes
5answers
54k views

How do I change my username?

Some time ago when I installed Ubuntu I chose a rather stupid username for my account that I do not want to use anymore. How do I change this (including the name of my home directory) without ...
53
votes
6answers
70k views

Easiest way to copy ssh keys to another machine?

I am lazy at home and use password authentication for my home machines. I am ready to move to key based authentication. There are many options on the web on how to do this, including catting then ...
50
votes
1answer
29k views

How do I retrieve the public key from a SSH private key?

A SSH private key as generated by ssh-keygen contains a public key part. How do I retrieve this public key from the private key? I've lost my public key and need to put the contents of this public key ...
49
votes
5answers
56k views

Is it possible to remove a particular host key from SSH's known_hosts file?

Is it possible to remove a particular host key from SSH's known_hosts file? I usually end up deleting the entire known_hosts file, which I have no problems with doing, but just out of curiosity, is ...
49
votes
8answers
36k views

Download a file over an active SSH session

So I'm SSHed into my Ubuntu server from my Ubuntu desktop. I'm at a certain path and I want to download a file to my local filesystem (preferably the path I was at before I entered the SSH session). ...
48
votes
2answers
5k views

How can I use a passcode generator for authentication for remote logins?

I would like to strengthen the authentication of my SSH logins by adding another factor: a passcode generator device, or a passcode generation application on my mobile phone. The only obvious options ...
46
votes
2answers
40k views

How do I keep track of failed SSH log-in attempts?

I'd like to see if somebody has been trying to log-in by brute-force into my Ubuntu 12.04 server over SSH. How can I see if such activities have been taking place?
39
votes
3answers
28k views

Does ssh key need to be named id_rsa?

I have come across this problem a couple of times when creating build servers with keyed authentication. I was wondering if anyone else has experience this. I have a couple of keys for my current ...
38
votes
9answers
22k views

How to harden an SSH server?

What measures can/should I take to make sure that security around my SSH server is absolutely impermeable? This will be community wiki from the start, so lets see what people does to secure their ...
38
votes
2answers
27k views

What is the difference between `ssh -Y` (trusted X11 forwarding) and `ssh -X` (untrusted X11 forwarding)?

What is the difference between ssh -Y (trusted X11 forwarding) and ssh -X (untrusted X11 forwarding)? As far as I have understood it, it has something to do with security, but I did not grasp the ...
35
votes
7answers
61k views

How to prevent “Write Failed: broken pipe” on SSH connection?

What can I do to configure SSH on both client and servers to prevent Write Failed: broken pipe errors? It often occurs if you sleep your client computer and resume later.
34
votes
3answers
24k views

Locale variables have no effect in remote shell (perl: warning: Setting locale failed.)

I have a fresh ubuntu 12.04 installation. When i connect to my remote server i got errors like this: ~$ ssh example.com sudo aptitude upgrade ... Traceback (most recent call last): File ...
32
votes
6answers
19k views

How to use SSH (ssh & rsync commands)?

How can I SSH with a remote server so I can browse files and edit them. I have a username and password to use.
31
votes
2answers
63k views

How can I chroot sftp-only SSH users into their homes?

I want to give a client access to my server, but I want to limit those users to their home directories. I will bind-mount in any files I want them to be able to see. I've created a user called bob ...
29
votes
4answers
47k views

How to disable strict host key checking in ssh?

I would like to disable strict host key checking in ssh for ubuntu 11.04. How to do it?
28
votes
4answers
12k views

What's the risk of upgrading over SSH?

When I run sudo do-release-upgrade over ssh, I get the following message. This session appears to be running under ssh. It is not recommended to perform a upgrade over ssh currently because in ...
28
votes
2answers
35k views

ssh: automatically accept keys

I've written this small utility script: for h in $SERVER_LIST; do ssh $h "uptime"; done When a new server is added to $SERVER_LIST, the script is stopped with: The authenticity of host ...
27
votes
2answers
58k views

How do I configure a new Ubuntu installation to accept ssh connections?

I just installed Ubuntu 11.04 (in a VM). How do I set it up to allow me to ssh into it? (Right now I get "ssh: connect to host x.x.x.x port 22: Operation timed out".)
27
votes
8answers
8k views

What is the best way to set up a headless server?

I have a ubuntu development server at work. It is an old rack server that is located somewhere in the company's dungeon, where nobody ever goes :)The only way it can work is as a so-called headless ...
27
votes
10answers
225k views

How to solve 'Connection refused' errors in SSH connection?

I have an Ubuntu Server 10.10 32-bit in my home. I'm making SSH connections to it from my PC via Putty. The problem is, sometimes I'm able to login seamlessly. However, sometimes it gives me an error ...
24
votes
9answers
13k views

What's the best way to SSH to machines on the local network?

I have 2 computers, one that I use and one for the kids. I want to be able to ssh into their computer to control it (like to shut it down etc) but am curious the best way to do this. We both are in ...
24
votes
3answers
18k views

Why do I get this warning from Gnome keyring in Xubuntu?

I have installed xubuntu-desktop ontop of a stock Ubuntu installation. When using ssh, or more specifically git, I always get this warning WARNING: gnome-keyring:: couldn't connect to: ...
24
votes
2answers
27k views

How to create a restricted SSH user for port forwarding?

ændrük suggested a reverse connection for getting an easy SSH connection with someone else (for remote help). For that to work, an additional user is needed to accept the connection. This user needs ...
23
votes
5answers
94k views

Adding SSH Keys to Authorized_Keys

I have an Ubuntu server on Amazon EC2, that I use for development, and today I stupidly cleared everything out of the authorized_keys file for SSH. Luckily I have an SSH open, so I am still ...
22
votes
6answers
110k views

SSH connection problem with “Host key verification failed…” error

I can connect to another Ubuntu machine in my LAN via SSH. On both of then PC's I installed openssh-server but from another Ubuntu computer I can not connect to my PC via SSH and I got this error: ...
22
votes
4answers
23k views

What is terminal command that can show OpenGL version?

So I want to find out which is my OpenGL version. I have access to Ubuntu via SSH. Which command shall I execute?
22
votes
3answers
39k views

In SSH, how do I mv to my local system?

Probably bad searching/not knowing the terminology, but: I've managed to ssh into my webhost's directory for me, and tar the webapp I want to back up and download. But when I try to mv to ...
22
votes
3answers
29k views

How do I copy files that need root access with scp?

I have an Ubuntu server to which I am connecting using SSH. I need to upload files from my machine into /var/www/ on the server, the files in /var/www/ are owned by root. Using PuTTY, after I log ...
21
votes
6answers
19k views

How do I permanently add an identity for SSH?

I need to run ssh-add <key> everytime I need to ssh into a webserver. Is there a way to add the ID permanently, so I dont have to keep adding the identities on each login? EDIT: The key is a ...
20
votes
7answers
32k views

Can you set passwords in .ssh/config to allow automatic login?

I'm using ubuntu 11.10. I'm using ssh for connecting to many servers daily, so i put their parameters in .ssh/config file; like this : Host Home User netmoon Port 22 HostName test.com Is there a ...
20
votes
3answers
49k views

How to start a GUI software on a remote Linux PC via SSH

Sometimes I need to start XMBC media player or other GUI software a one of my PC (small Xubuntu PC used as a media center). Usually I do this starting a X11vnc server on the remote PC via SSH and ...
19
votes
3answers
15k views

Does SSH use any compression?

I am curious, does SSH compress its data before sending/receiving it? If it does not by default, then can it be turned on?
18
votes
5answers
70k views

Create a new SSH user on Ubuntu Server

Just created a new virtual Ubuntu server and I'm in the process of hardening it for production use. I currently have a root account. I want to do the following: Create a new user (let's call them ...
18
votes
2answers
9k views

Enter SSH passphrase once

Before upgrade When I was running git clone git@... (using ssh) once per computer restart a window dialog was appearning that was containing a textbox where I was intersting my ssh passphrase and ...
18
votes
4answers
23k views

Simple & easy way to jail users

I need a simple and easy way to jail users in their home directories in Oneiric. Do you have a simple configuration for jailing users, with full help, or some good web links? I would be offering an ...
17
votes
2answers
646 views

Accidentally typed password in username input, any logs to clear?

I have accidentally typed my password in SSH's interactive username prompt. Are there any log files that I should clear?
16
votes
2answers
9k views

How can multiple private keys be used with ssh?

I was able to setup ssh to use private/public key authentication. Now I am able to do ssh user@server1 And it logs on with the private key. Now I want to connect to another server and use a ...
16
votes
5answers
64k views

passwordless ssh not working

I've tried to setup a password-less ssh b/w A to B and B to A as well. Generated the public and private key using ssh-keygen -trsa on both the machines. Used the ssh-copy-id utility to copy the ...
16
votes
6answers
29k views

What terminal-based network speed tests are available?

I'm looking to find a way to test my internet speed at home through ssh. Does anyone know a terminal app that can give me calculations similar info to speedtest.net? It would also be really cool ...
16
votes
3answers
28k views

How do I launch a remote firefox window via SSH?

When I SSH to a remote box $ ssh -X remotebox then start firefox on the remote box remotebox$ firefox and I have firefox running on my local machine, a local firefox window will open. no firefox ...
16
votes
2answers
13k views

How to get coloured terminal over ssh?

When I connect over ssh to remote hosts everything is just a single font/color. I would like to have colours like I do locally e.g. green for executable and blue for symlinks etc. And such that when I ...
15
votes
5answers
8k views

How to speed up SSH login?

From outside of my house, whenever I login to my Ubuntu server using SSH, it takes about 6 seconds for me to get the prompt for password, however when I login to my web hosting server it takes about 1 ...
14
votes
7answers
18k views

Where is “Connect to Server” for ssh connections in Unity?

Cannot find "connect to server" in 11.04, looks like unity doesn't have it. Is there other very similar way to connect to another Ubuntu computer via SSH? (not in terminal)
14
votes
2answers
16k views

Progress bar in scp command

Is there any way to display a progress bar while copying from server to local using scp(or vice versa)
14
votes
2answers
42k views

Connecting to ubuntu server via ssh externally

I have recently installed ubuntu server (12.0.4) and intend to use it primarily as a file server. I am completely new to linux so this is a pretty big learning curve. Yesterday I was able to ...
14
votes
3answers
15k views

copy ssh private keys to another computer

I need to use another computer to access my ssh server. This is because a recently implemented vpn at my university doesn't work on my current computer and I have lost access to the server. I ssh ...
14
votes
5answers
14k views

Switch encoding of terminal with a command

One of the servers I quite often ssh to uses western encoding instead of utf-8 (and there's no way I can change that). I've started writing a bash script to connect to this server, so I won't have to ...