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

learn more… | top users | synonyms

11
votes
2answers
7k views

SSHFS specify key

I've got a question that I've not been able to find an answer for. I have two computers, both of which run Ubuntu Linux 12.04. I have set up my first computer ("home") to be able to SSH into my second ...
11
votes
1answer
3k views

Limits of SSH multiplexing

I have the following entry in my .ssh/config file Host AAA User BBB HostName CCC ControlMaster auto ControlPath ~/.ssh/%r@%h:%p The above allows me to multiplex multiple ssh ...
11
votes
5answers
2k views

How to copy a file that is still being written over ssh?

Here is the situation: I am uploading a large file from client A to a server using sftp. I also need to download this file from the server to client B over ssh. What I would like to do is start ...
11
votes
5answers
8k 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 ...
11
votes
3answers
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, ...
11
votes
3answers
1k views

Adding a user who can only execute scripts remotely

I would like to create a user who can only do one thing: via ssh specify a script ( and commandline arguments to the script ) that resides in one particular folder ( for the purposes of this question ...
11
votes
1answer
3k views

Remote desktop over SSH reverse tunnel to replace TeamViewer

I want to open a remote desktop session from my laptop to desktop over my SSH (reverse) tunnel. That should be simple (or at least doable), right? Until now I've been using Team Viewer to log in to ...
11
votes
4answers
659 views

Groups differ from the local ones when logging in remotely

We store our users in LDAP, alongside some groups that have meaning across different systems (organizational roles including wheel). There are also groups local to workstations, e.g. audio or video ...
10
votes
4answers
1k views

How do I trigger autocomplete without a tab key?

I'm ssh-ing to my machine using my iPhone with an app called ServerAuditior. It doesn't have tab key. See screenshot. How do I trigger autocomplete without the tab key? I don't want to type a lot of ...
10
votes
3answers
2k 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' ...
10
votes
4answers
7k 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 ...
10
votes
2answers
853 views

How to temporarily switch from ssh to my local shell?

I'm using cygwin. and use it with ssh to login into a ubuntu server. sometimes, I want to switch back to my cygwin and then quickly switch to ubuntu shell. How to do this?
10
votes
3answers
4k views

How to close (kill) ssh ControlMaster connections manually

With the following .ssh/config configuration: ControlMaster auto ControlPath /tmp/ssh_mux_%h_%p_%r ControlPersist 4h How to close the persisting connection before the 4 hours? I know you can make ...
10
votes
4answers
317 views

Is my SSH key paired with me as a human, or with my user account on one machine?

In the past few days, I have been trying to acquaint myself with SSH, and I hope that I've understood it. One question remains, however -- is my key associated with me (as the user) or my user ...
10
votes
3answers
3k views

How can I make a user able to log in with ssh keys but not with a password?

I would like to create a user and have no password. As in you cant log in with a password. I want to add keys to its authorized_keys by using root. This is for my automated backup system.
10
votes
1answer
11k 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 ...
10
votes
2answers
13k 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 ...
10
votes
2answers
40k views

ssh_exchange_identification: Connection closed by remote host (not using hosts.deny)

I'm not using hosts.allow or hosts.deny, further more SSH works from my windows-machine (same laptop, different hard drive) but not my Linux machine. ssh -vvv root@host -p port gives: OpenSSH_6.6, ...
10
votes
2answers
1k 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.
10
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 ...
10
votes
3answers
1k views

How can I lock my own account from remote ssh login with password?

I don't want to disable remote login with password altogether, but I want to make it so that my account is only accessible with key pair authentication (there are other users who wants to use ...
10
votes
3answers
26k 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
618 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
9k 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: ...
9
votes
8answers
11k 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 ...
9
votes
7answers
11k 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
2answers
8k 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
1answer
13k 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
5answers
13k 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 ...
9
votes
2answers
637 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
2answers
3k views

How to ensure SSH port is only open to a specific IP address?

This is my /etc/sysconfig/iptables: It has two ports open 80 apache and 22 for ssh. # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. ...
9
votes
1answer
1k 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
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 ...
9
votes
3answers
7k 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
4answers
14k 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 ...
9
votes
2answers
15k 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
2answers
14k 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?
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
1answer
6k views

Foreign characters won't display in SSH

I'm having some problems with using ssh and a remote server (which I do not have admin access to) - Specifically, there are a couple of folders on there with Korean and Cyrillic text. When I display ...
9
votes
3answers
6k 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
1answer
493 views

How can I limit ssh *remote* port forwarding?

I need to limit which ports can be remotely 'ssh -R' forwarded by an user. I know about permitopen option on authorized_keys, but as it says on man page it only limits local 'ssh -L' port forwarding ...
9
votes
3answers
645 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
851 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
4answers
814 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 ...
8
votes
3answers
10k 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
2answers
633 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
3answers
4k views

Permit root to login via ssh only with key-based authentication

I have some doubts about certain ssh server configurations on /etc/ssh/sshd_config. I want the next behavior: Public key authentication is the only way to authenticate as root (no password ...
8
votes
1answer
2k views

Reusing ssh session for repeated rsync commands [duplicate]

Possible Duplicate: Using an already established SSH channel I have a remote server accessible via a chain of SSH proxies. The resulting channel is wide and fast enough, but setting it up ...
8
votes
3answers
14k 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 ...