SSH (Secure SHell) is a protocol for running commands on a remote computer.

learn more… | top users | synonyms

10
votes
2answers
1k views

How to open a port early in boot process to unlock LUKS via SSH

I have a fully encrypted server running Debian 7 and have set up dropbear and busybox to unlock the LUKS container via SSH (as described in this tutorial and in this U&L answer). Unfortunately, ...
10
votes
3answers
24k views

sudo over ssh: no tty present and no askpass program specified

I keep getting this error and have tried several ways discussed online to fix this and none are working for me. I have setup SSH keys so when I run 'ssh newton@host.com' it automatically logs me in, I ...
10
votes
1answer
548 views

Redirect linux console on boot

Is it possible on boot to redirect the console output to a screen session? The server has no monitor attached, and I'd like to be able to see the primary console output. I've seen other posts about ...
9
votes
4answers
28k views

SSH login with clear text password as a parameter?

I need to login to a user that I've created on a remote host running Ubuntu. I can't use an ssh key because the ssh login will happen from a bash script ran within a server that I wont have access to ...
9
votes
3answers
1k views

How to SSH into a specific directory?

I frequently login to a server, then cd into a specific directory. Is it possible to simplify these two commands into one? ssh bob@foo cd /home/guest I'd like to avoid changing anything on 'foo' ...
9
votes
2answers
7k views

Starting firefox on a remote host (over ssh) opens a new window locally: what is happening?

I have never noticed this behaviour before, and am a little confused as to what is happening. I have a local copy of firefox running, then ssh (ssh -X <url>) into a remote server and start a ...
9
votes
7answers
9k views

How do I work with GUI tools over a remote server?

I have an Ubuntu server running on EC2 (which I didn't install myself, just picked up an AMI). So far I'm using putty to work with it, but I am wondering how to work on it with GUI tools (I'm not ...
9
votes
1answer
12k views

How to wget a file to a remote machine over SSH?

I'd like to basically pipe a wget command to a file on a remote server over SSH. How can I do this? I know I could simply ssh into the server and have it download the file, but I'd much rather use the ...
9
votes
2answers
579 views

Is an SSH connection faster if I lower the RSA key size?

I have a very slow connection, and I need to use SSH on it. How can I increase "the speed"? I mean is using big RSA keypairs a large overhead? Would lowering the key size increase the effective ...
9
votes
1answer
891 views

Why does SSH not consult /etc/hosts?

I'm administrating a networked environment where the users authenticate over NIS. All machines can be used to SSH into the server but one. On the machine in question, I get the message ssh: connect ...
9
votes
3answers
5k views

Differences between VNC and ssh -X

Why would you use VNC (or for that matter NX) instead of just using ssh -X (-Y). I read that VNC uses less bandwidth, but is there any other differences/advantages with respective tool?
9
votes
2answers
855 views

Can I unfreeze bash or vim when SSH session freezes from timeout? [duplicate]

When my SSH session times out, the whole terminal freezes. Is there any way to break out of that connection? CTRL+C doesn't cut it.
9
votes
5answers
7k views

Copy input to clipboard over SSH?

Here's my usage case: I'm often connected to other computers over SSH for work and I often need to copy and paste documents/text from the server to locally running editors for writing examples and ...
9
votes
2answers
13k views

Use ssh with a specific network interface

I'm using openconnect to connect to vpn. After entering my credentials, I get this: POST https://domain.name/... Got CONNECT response: HTTP/1.1 200 OK CSTP connected. DPD 30, Keepalive 30 Connected ...
9
votes
3answers
1k views

Advice for managing SSH keys

What is the best practice you have found for managing lots of SSH keypairs? I use SSH to connect to several systems, both at home and at work. I currently have a fairly small, manageable collection ...
9
votes
2answers
2k views

Ssh login hook?

Is there a way to run a script/command every time a user connects using ssh? Can it be configured globally (i.e run the script when any user login)? I came across this question on Identica, but there ...
9
votes
3answers
4k views

Tell SSH to use a graphical prompt for key passphrase

How can I force SSH to request passphrases using a graphical prompt (GTK, for example) instead of the standard one that uses the terminal? I tried setting SSH_ASKPASS=/usr/bin/ssh-askpass but it ...
9
votes
3answers
616 views

GVim compiled from source opened via SSH -X does not copy paste on selection

I'm using SSH (with -X specified) from a Ubuntu box to a RHEL4 box and running GVim. It opens as expected in my local X, but the copy and paste via select doesn't work. I cannot select text in GVim ...
9
votes
1answer
759 views

Best Practices for SSH, tmux & GnuPG Agent

I'm attempting to consolidate my encryption software to GnuPG, and I'm running into a confusing problem. My primary unit is a headless server, and I exclusively work in tmux. There is no X session, ...
8
votes
3answers
9k views

passwordless ssh for another username?

I want to do a passwordless ssh connection for a subversion project. Right now I'm using ssh+svn, and it's a little annoying, because I have to type the password any time I want to transact with the ...
8
votes
4answers
7k views

how to avoid ssh asking permission?

We are attempting to speed up the installation of oracle nodes for RAC installation. this requires that we get ssh installed and configured so that it doesn't prompt for a password. The problem is: ...
8
votes
4answers
5k views

How to avoid being asked passphrase each time I push to Bitbucket

I set up my ssh stuff with the help of this guide, and it used to work well (I could run hg push without being asked for a passphrase). What could have happened between then and now, considering that ...
8
votes
2answers
16k views

SSH and home directory permissions

It took me hours to solve this SSH problem with one of my class accounts on my school's servers. I couldn't ssh into one particular class account without entering my password, while passwordless ...
8
votes
2answers
619 views

SSH: which one is my public key

My university asked my SSH public key as I need access to universities computer cluster. I generated SSH key using linux ssh-keygen -t dsa command. However, I don't know what information they need ...
8
votes
2answers
3k views

Creating a UNIX account which only executes one command

Is there a way to create a user account in Solaris which allows the users to run one command only? No login shell or anything else. I could possibly do it with /usr/bin/false in /etc/passwd and just ...
8
votes
2answers
2k views

Detach/reattach an application run on X over SSH?

I have a development server that I leave running all the time, and a development laptop that I turn off/on everyday. I have a GUI application on the server that I'd like to run over SSH -X, and I'd ...
8
votes
3answers
12k views

Can I connect to or view abandoned ssh sessions?

I have a virtual instance of redhat running that I can ssh to from any host on the corporate network. My ssh session was dropped while running some scripts that may or not have caused me to ...
8
votes
1answer
293 views

Using SSH to connect to a new server without storing the host keys in the $HOME/.ssh/known_host file

I get the following output if I run the following command: -bash-3.2$ ssh -o "StrictHostKeyChecking no" 192.168.1.77 Warning: Permanently added '192.168.1.77' (RSA) to the list of known hosts. Last ...
8
votes
2answers
772 views

View Script Over SSH?

A friend, using a remote machine, SSHed to my machine and ran the following python script: while (1): ....print "hello world" (this script simply prints 'hello world' continuously). I am now ...
8
votes
1answer
6k views

scp and compress at the same time, no intermediate save

What is the canonical way to: scp a file to a remote location compress the file in transit (tar or not, single file or whole folder, 7za or something else even more efficient) do the above without ...
8
votes
2answers
2k views

How do I background an SSH session? [duplicate]

Possible Duplicate: How can I break away from an SSH session that has crashed? I have started an SSH session on the command line, but now I want to get back to my local command line. For ...
8
votes
5answers
11k views

Can a linux user change their password without knowing the current password?

I'm setting up a few ubuntu boxes, and using opscode's chef as a configuration tool. It would be fairly easy to install public keys for each user on each of these servers, and disable password ...
8
votes
4answers
11k views

How to copy with SCP between two servers using key auth?

I can log in via SSH using key authentication to SERVER1 and SERVER2. However, I can't copy files between the two servers. Why? How can I copy between them? (the data that I have to copy is bigger ...
8
votes
3answers
5k views

How can I track who SSH'es into my linux machine?

I'm running Ubuntu 10.04. Is there a way I can get a daily report of who has logged onto the box, what time, and even - this may be asking too much - a report of the commands they used? This is a ...
8
votes
2answers
12k views

ssh and character encoding

When I ssh into my VPS, I have irssi running in screen. When someone sends a unicode character (such as © or €), irssi displays garbage when I use it via the screen in a ssh session. If I connect to ...
8
votes
2answers
12k views

How to edit authorized_keys?

What is the best method for editing the /root/.ssh/authorized_keys file? I mean if I need to append a new key to my authorized_keys file, than what are the best methods to do that?
8
votes
1answer
168 views

Does ssh-agent store my passphrase?

Is it possible to determine the passphrases of private keys added to ssh-agent? I'm thinking along the lines of someone with root privileges trying to find out my passphrase after I have added the ...
8
votes
2answers
2k views

How to restrict an SSH user to only allow SSH-tunneling?

How can I restrict a user on the ssh server to allow them only the priviledges for SSH TUNNELING? i.e. So they cannot run commands even if they log in via ssh. My Linux servers are Ubuntu 11.04 and ...
8
votes
4answers
456 views

Good practice to use same SSH keypair on multiple machines?

I recently got a new laptop for work, and I was wondering whether it'd be good practice to keep using the same RSA keypair as I'm using on my old work laptop. I'd really like to not have to create ...
8
votes
1answer
926 views

Bash autocomplete in ssh session

It seems that bash doesn't want to autocomplete commands (what's annoying me right now is not autocompleting apt-get) when I'm logged into my machine from SSH. Is there some setting that will allow ...
8
votes
2answers
2k views

How to efficiently use 3D via a remote connection?

I have one weak PC (client) but with acceptable 3D performance, and one strong PC (server) which should be capable of running an application using OpenGL twice, i.e. once locally and once remotely for ...
8
votes
2answers
110 views

Weird SSH issue, ssh works with -t but freezes without it

When I ssh into one of my servers, it seems to log in, but then hangs before giving me the prompt (message debug2: shell request accepted on channel 0 is the last log entry). Though the odd thing is ...
8
votes
4answers
618 views

Failing to block brute force ssh with iptables

I'm trying to block (slow down) brute force attacks on my sshd server. I'm following this guide http://www.rackaid.com/resources/how-to-block-ssh-brute-force-attacks/ which basically says I need to ...
7
votes
4answers
711 views

I am using `&`: why isn't the process running in the background?

I know that I can append & to a command to run the process in the background. I'm SSH'ing into an Ubuntu 12.04 box and running a python program with $python program.py & -- but when I go to ...
7
votes
4answers
21k views

How to copy files from one machine to another using ssh [duplicate]

I'm using Linux (centos) machine, I already connected to the other system using ssh. Now my question is how can I copy files from one system to another system? Suppose, in my environment, I have two ...
7
votes
4answers
949 views

Is there a way to check a users SSH key to see if the passphrase is blank

I'm looking to lock down our Solaris 10, RHEL 5, and SLES 11.2 servers. It has come to my attention that some of the users have no passphrase for their SSH keys. Is there a way I can check for this ...
7
votes
8answers
7k views

Automatically run commands over SSH on many servers

There is a list of IP addresses in a .txt file, ex.: 1.1.1.1 2.2.2.2 3.3.3.3 Behind every IP address there is a server, and on every server there is an sshd running on port 22. Not every server is ...
7
votes
3answers
481 views

Run a diff between local and remote file

I'm connected on a host via ssh and I'd like to compare (let's say with diff) a certain config file against its counterpart on another host, also accessible via ssh, without having to manually ...
7
votes
2answers
4k views

ssh port forward to access my home machine from anywhere

http://serverfault.com/questions/303937/how-to-make-freebsd-box-accessible-from-internet I want to understand this whole process of port forwarding. I read so many things but failing to understand ...
7
votes
2answers
10k views

List all connected SSH sessions?

I just SSH'd into root, and then SSH'd again into root on the same machine. So I have two windows open both SSH'd into root on my remote machine. From the shell, how can I see a list of these two ...