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

learn more… | top users | synonyms

6
votes
1answer
3k views

SSH over Socks proxy without username or password

I have a list of SOCKS proxy servers from this site. I've read about creating a dynamic tunnels with ssh -D and to be honest i've tried that already. Unfortunately for some reason I cannot connect to ...
6
votes
3answers
512 views

Send an email any time an SSH key is used

I have about 30 nearly-identical CentOS 6 servers that I need to be able to push out updated config files automatically using an rsa key to log in as root. Usually this will just be rsync, but ...
6
votes
4answers
2k views

SSH authentication: either SSH keys or one time password

I have an Ubuntu 10.04 Linux server that I normally ssh into (from my home machine) using ssh key authentication. However, sometimes I need to ssh remotely from potentially insecure machines (like ...
6
votes
2answers
1k views

Can I set my local machine's terminal colors to use those of the machine I ssh into?

I have a color scheme that I like for when I'm in a terminal, but I ssh into the machine I work on from multiple sources (locally, PuTTY, my netbook, etc.) and I want to maintain the same color scheme ...
6
votes
1answer
110 views

ssh from linux into mac - permission denied

I'm running a Oracle Linux VM on a Windows 7 host and I'm trying to ssh into my MacBook. I've already created the private/pub keys in my Mac. I have copied the id_rsa.pub contents into the ...
6
votes
2answers
384 views

Why not simply use %h in OpenSSH ssh's ControlPath option?

Why do the "ssh_config(5)" manpages recommend that the ControlPath option should contain at least the %h, %p and %r placeholders in order to uniquely identify each shared connection? I thought that ...
6
votes
1answer
4k views

X11 forwarding an OpenGL application from a machine running an NVIDIA card to a machine with an AMD card

I'm interested in forwarding an X11 session over SSH, in order to launch a remote process that utilizes OpenGL (specifically, gazebo for anyone familiar.) The problem that I seem to be running into ...
6
votes
1answer
201 views

Does fail2ban offer any additional protection to SSH if password login is already turned off?

I’m setting up a Debian VPS on Linode to use as a public web server, and I’m following their security suggestions. The last suggestion they make is to install fail2ban, to avoid dictionary attacks on ...
6
votes
2answers
1k views

SSH LocalCommand on exit

In ~/.ssh/config you can use the LocalCommand directive to execute a local command whenever you connect to a remote machine via SSH. But how do I execute a command when I exit an SSH connection? It ...
6
votes
2answers
1k views

Giving some users only SSH and shell access with limited resource usage

I'm trying to make a user that can access my server through SSH and allow it to have a shell, limited to using only, say screen and irssi. And it shouldn't it be able to see other directories except ...
6
votes
4answers
2k views

How to debug SSH port forwarding

This is an extension to ssh port forward to access my home machine from anywhere I tried things mentioned there but I am not able to ssh to my machine. Netgear router settings for port forwarding: ...
6
votes
2answers
574 views

Configuring a vncserver so it's only accessible from my ssh tunnel

Since I use vnc through an ssh tunnel, is there any way I can block the open vnc port that the remote machine is listening on without it affecting my ability to use the ssh tunnel? Both machines are ...
6
votes
4answers
1k views

Why do I need to hit enter to get my shell prompt after my init.d script completes?

I had to write my own CentOS init.d script for celery because it only ships with one for Debian. You can see the script I wrote when I answered my own stack overflow question 3989656. But there's a ...
6
votes
2answers
2k views

Why Bash unable to find command even if $PATH is specified properly?

I am specifying path to my command in the file /etc/profile: export PATH=$PATH:/usr/app/cpn/bin My command is located in: $ which ydisplay /usr/app/cpn/bin/ydisplay So, when I performing "echo ...
6
votes
3answers
419 views

firefox process dies after ssh log out on remote machine

I need to run firefox on a remote host via ssh and keep process running even after ssh logout. I already have tried these ways: nohup firefox & screen disown -h But it seems these work only ...
6
votes
3answers
833 views

How to add an ip range to known_hosts?

Many services (like GitHub) use a wide range of IPs, and obviously the same public key. How can I add an IP range (preferably in a single) to known_hosts file? For the GitHub example, it uses the ...
6
votes
1answer
2k 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 ...
6
votes
1answer
1k views

How to use ssh-agent with multiple (valid) keys and yet choose which one to use?

Let's say there are two keys A and B, both of which are valid for user@host public key authentication. Since authorized_keys is configured for different behaviour depending on the key, ~/.ssh/config ...
6
votes
2answers
2k views

Get ssh to forward signals

I want to be able to send signals (SIGINT is the most important) through ssh. This command: ssh server "sleep 1000;echo f" > foo will start sleep on server and after 1000 seconds it will put ...
6
votes
2answers
841 views

How to speed up X over fast connection ? (especially over ssh)

What are recommendations on speeding up X applications over local fast (gigabit) connections? (similar question for slow connections) Currently I'm running over ssh -Y, which is fine, but I wonder if ...
6
votes
2answers
1k views

working with filenames in a different encoding over ssh

I'm ssh'ing to a remote system where a different encoding for the filenames (and for the users' locales) has been used. And this causes some problems. Problems solved by matching the locale settings ...
6
votes
1answer
1k views

SSH not terminated after exit when there is X Forward program

After running X programs over SSH, SSH doesn't terminate after shell exit (have to use e.g. CtrlC to kill it). My guess is although the X program already exit, there is still some "connection" left ...
6
votes
1answer
108 views

Waiting until SSH tunnel (ssh -w) is set up before running command

When using SSH VPN tunnelling (-w option), is there a way to know when the tunnel is actually up? I want to use this in a script that automatically sets up the tunnel by running ssh -w then running ...
6
votes
1answer
63 views

Ssh audio redirection

I have DVB-T USB dongle plugged into my Linux server (GUI-less). It works correctly, but I want to stream TV programs from server to my PC. For this I use Kaffeine that way: ssh -X -p 666 -i ...
6
votes
2answers
366 views

ssh-agent: don't forward authentication for the whole keyring

I have two private ssh keys : one to access my personnal machines, one to access servers at my job. I add those two keys to my ssh-agent with ssh-add. Now, when I do ssh -A root@jobsrv I ...
6
votes
1answer
313 views

SSH session pauses mid datastream; resumes with a keypress

I've had this problem occur at random, intermittently, across boxes at multiple companies, multiple distros, and multiple kernel revs. I think that I'm just cursed. What happens is that I'll have a ...
6
votes
1answer
524 views

caching a master passphrase on a linux server

I am trying to use keychain on debian latest stable with some difficulty. Searching online I could not find a solution, but thought perhaps a different approach or a different tool might be better in ...
6
votes
3answers
788 views

emacs syntax highlighting fails on my SSH client

I need to connect to a remote server by SSH to edit some documents. When I work at home, I SSH to the remote server using SSH Secure Shell and open emacs, but it doesn't fully highlight documents as I ...
6
votes
2answers
2k views

Enabling system management privileges for non-local users - How the heck does `polkit` work, anyways?

I am managing a CentOS 6.2 server remotely using X over SSH (actually NX, but that's just a proxy). The Everything is working correctly, except when I try to do tasks that would normally require ...
6
votes
3answers
2k views

Remote-Accesible Live-Distribution (aka Live CD)

I'm looking for a live distribution (Live CD or the likes) which comes - per default - with sshd running at startup. I want to check the components of my laptop whose graphics has died ...
5
votes
5answers
490 views

I messed up my zshrc on a remote server and now I can't run any commands!

On a remote machine I changed my zsh settings and it is now broken, for every keypress it says: "url-quote-magic:1: url-quote-magic: function definition file not found " I don't have another ...
5
votes
3answers
20k views

Shell Script for logging into a ssh server

I tried writing a shell script which can do automatic login into a ssh server using password which is mentioned in the script. I have written the following code: set timeout 30 /usr/bin/ssh -p 8484 ...
5
votes
2answers
2k views

Multiple SSH private keys, possible?

Is it possible to have multiple SSH key in a single client, and let ssh choose the right one automatically?
5
votes
2answers
3k views

What causes a ssh interruption?

What exactly causes a ssh connection to interrupt? When you idle for a while, it disconnects. How do I keep the connection alive (without autossh or reconnect)?
5
votes
3answers
1k views

Is there any disadvantage in using SSHFS instead of SSH alone?

I find it easier to use SSHFS to mount a remote file system on my local computer instead of plainly SSH'ing into the remote computer. This saves me from using all the complicated scp commmands for ...
5
votes
2answers
6k views

What do the channel numbers in ssh error message refer to?

In the example below what do the channel numbers correspond to? Which are on the server? Which are on the client? $ ssh -L1570:127.0.0.1:8899 root@thehost Password: Last login: Fri Aug 9 ...
5
votes
3answers
5k views

Disable user shell for security reasons

We have several user accounts that we create for automated tasks that require fine-grained permissions, such as file transfer across systems, monitoring, etc. How do we lock down these user accounts ...
5
votes
5answers
887 views

Multiple ssh sessions in single command

I'm trying to copy a database from one server to another. I tried using the following command and it's getting tied up on entering the ssh passwords. If I put in one server's password, it complains ...
5
votes
4answers
6k views

What are the different ways that a message can be displayed to a bash shell after a user logs in?

I have a CentOS 5.7 VPS using bash as its shell that displays a branded greeting immediately after logging in via SSH. I've been trying to modify it, but can't seem to find where it is in the usual ...
5
votes
2answers
8k views

How to configure SVN/SSH with SSH on non standard port?

I have configured SSH to be on port 20000. When I try: svn co svn+ssh://server.com:20000/home/svn/proj1 proj1 --username jm I get svn: To better debug SSH connection problems, remove the -q ...
5
votes
1answer
1k views

How many users does Linux support being logged in at the same time via SSH?

I know Linux supports multiple users being logged in at the same time. But what's the maximum number of users that can be logged into Linux at the same time? I see there are there are 69 tty files ...
5
votes
5answers
557 views

How to setup password-less ssh with RSA keys

I am trying to setup a password-less SSH configuration between two machines and am having trouble. There are a ton of howtos out there that I have followed and have had no success. Here are ...
5
votes
2answers
4k views

How to properly run “top” command through SSH?

I have to run top command on one computer being on another. My targeted PC has IP 192.168.0.81 I was trying to do it: ssh 192.168.0.81 top But I got this result: top: tcgetattr() failed: Invalid ...
5
votes
4answers
8k views

Set some firewall ports to only accept local network connections?

Basic firewall question: How do I set up the firewall on a system in a LAN so that some ports are only open to connections from the local area network, and not from the outside world? For instance, ...
5
votes
2answers
230 views

Writing a “telnet server” type program that uses SSH instead of telnet

So people have written server programs using telnet in which the user simply does telnet server.com and this connects them to the server program, which then provides them with a textual program they ...
5
votes
1answer
531 views

What happens to a continuing operation if we do ssh and then disconnect?

I am moving one directory to another using mv command. However, I was forced to shut down my computer, which means losing connection to the server. What happen to the mv command? Note: After I ...
5
votes
3answers
1k 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 ...
5
votes
1answer
237 views

Running programs over ssh

I am planning to log in to my college PC using ssh and run some simulations. These simulations take very long time, so I would like the relevant process to run longer than the ssh session (I want to ...
5
votes
2answers
263 views

Provide user name when using vim with scp

I was reading about SSH here http://blogs.perl.org/users/smylers/2011/08/ssh-productivity-tips.html and found that you can use vim to directly modify a file on a remote server that you can ssh into. ...
5
votes
2answers
5k views

Not able to ssh in to remote machine using shell script in Crontab

Below is the script which i am trying to run, which runs without any issue for i in `seq 200 2100` do usr=(`ssh -t -t -o ConnectTimeout=60 machine$1 finger | tail -1 | awk '{print$1}'`) echo ...