SSH, otherwise known as "Secure Shell", is a method for securely connecting to a remote computer.
47
votes
3answers
6k 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 ...
46
votes
2answers
4k 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 ...
42
votes
9answers
23k 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?
41
votes
8answers
15k 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).
...
30
votes
2answers
9k 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 ...
28
votes
6answers
19k 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 ...
28
votes
5answers
20k 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?
26
votes
6answers
7k 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.
25
votes
7answers
6k 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 ...
24
votes
2answers
4k 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?
23
votes
8answers
4k 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 ...
22
votes
1answer
11k 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 ...
22
votes
2answers
10k views
Difference between `ssh -Y` and `ssh -X`
What is the difference between ssh -Y and ssh -X? As far as I have understood it, it has something to do with security, but I did not grasp the difference and when to use which.
19
votes
3answers
9k views
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 for. But just out of curiosity, Is it possible to remove just a single entry? I opened the known_hosts file, and other ...
18
votes
4answers
5k 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 ...
17
votes
10answers
112k 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 ...
16
votes
2answers
463 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?
14
votes
2answers
10k 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 ...
14
votes
2answers
10k 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 ...
13
votes
3answers
7k 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?
13
votes
2answers
2k 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 ...
13
votes
5answers
4k 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 ...
13
votes
2answers
15k views
How can I chroot sftp-only SSH users into their homes?
I want to give some people access to my server but I want to limit their 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 ...
13
votes
3answers
1k views
How do you manage SSH keys?
I have a server with multiple users which each have multiple authorized SSH keys. Is there any effective way (command line utility?) to keep track of which key belongs to who and to quickly remove/add ...
12
votes
7answers
11k 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)
12
votes
1answer
660 views
How should I manage a secure, personal ssh key?
I need to have a personal ssh key such that:
I can back up a single file containing my private key, and restore it when I do a new install.
The private key is never stored in unencrypted form ...
11
votes
6answers
7k 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 ...
11
votes
4answers
6k views
How can I have multiple terminal sessions through one single SSH connection?
I have an Ubuntu server edition running and I can SSH into it to perform various tasks. What I'd like is the ability to SSH into my server kick off a server application and then switch to another ...
11
votes
5answers
15k 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 ...
11
votes
1answer
2k 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 ...
11
votes
1answer
3k views
How can I use pulseaudio over ssh?
I'd like to listen to music on my home server from work. Both are Ubuntu boxes running pulseaudio. It seems from researching that applications communicate to the PA server via TCP on port 4317, so I ...
11
votes
1answer
1k views
disable shutdown/suspend if there is other user logged in via ssh
I remember that in versions of ubuntu around 9.04 was possible to disable user to shutdown ( and maybe suspend too ) system if there was other user logged in.Something like policykit or similar.
Is ...
10
votes
4answers
13k views
How to install updates via command line?
Good day,
When I log into my web server via SSH I see the information:
88 packages can be updated.
80 updates are security updates
I tried apt-get update then apt-get upgrade but each time I log ...
10
votes
5answers
36k 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:
...
10
votes
4answers
5k views
X11 Forwarding over Gnu Screen, is it possible?
I use GNU Screen constantly. But, I've been trying to figure out if there is someway to get X11 apps to forward over screen when I am ssh-ing (Is that a word?). Currently if I try to run 'gedit' ...
10
votes
5answers
9k views
How to secure ubuntu server from bruteforce ssh attacks?
I have my passwords secure, but I heard people complaining about perfomance of a server going down drastically when a bruteforce attack is taking place. How can I secure my ubuntu 10.10 server from ...
10
votes
4answers
2k views
Is there a GUI utility to mount remote filesystems over SSH?
Is there a GUI utility to mount remote filesystems over SSH (SSHFS)?
10
votes
2answers
5k 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 ...
10
votes
5answers
4k 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 ...
10
votes
3answers
3k views
Automatically change Terminal colors on remote connection?
Is there a way to automatically apply a terminal profile when connected to a remote machine via SSH?
I'd like more obvious visual cues that I'm connected to a remote machine than the user/host ...
9
votes
2answers
1k views
Disable password access through SSH?
I'm setting up a server for backing up my desktop box remotely. I want to prevent remote password access to the server, permitting only users with private keys (AKA my desktop box) to access it. How ...
9
votes
3answers
2k views
How do I run a graphical application on a remote server when logged in through ssh?
I am trying to run gedit from an SSH terminal on Windows, connected to an Amazon EC2 instance running Ubuntu 12.04 Server and I am getting this error:
Cannot open display:
How do I fix it?
9
votes
2answers
10k 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?
9
votes
5answers
32k 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 ...
9
votes
3answers
7k views
How do I edit the ssh motd?
I would like to add some fields to the ssh MOTD.
MOTD today:
Linux toker 2.6.31-22-generic-pae #69-Ubuntu SMP Wed Nov 24 09:04:58 UTC 2010 i686
To access official Ubuntu documentation, please ...
9
votes
3answers
5k 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?
9
votes
2answers
5k views
How do I route my internet through a SSH tunnel?
Old Q How do I setup an OpenVPN server without root privileges?
Is there a way to setup an OpenVPN server without root privileges? E.g. with configuration files in my home directory? If yes, how do I ...
9
votes
6answers
2k views
SSH tunnel logging?
I have a computer running SSH that I would like to give my friends access to, but I do not want them to use my internet connection through SSH tunnelling (although I'd like to do so myself). Is there ...
9
votes
5answers
14k views
How do I install a ssh private key generated by puttygen?
I set up my linux server to accept connections from my home PC by adding the public key generated by puttygen to the authorized_keys file.
Now I'm trying to connect to the same machine, but this time ...
9
votes
3answers
2k views
How do I backup ssh keys?
I am planning to do a fresh install of ubuntu 11.10 in my system. Before that i have setuped key based ssh authentication in this machine. Is it possible to take backup of those ssh keys, so that i ...

