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

learn more… | top users | synonyms

1
vote
1answer
35 views

Can I switch to another process in another tty# terminal from an ssh terminal?

Here's the deal. I have a Linux Mint 15 server running a web server, an ssh server, and a minecraft server. When I go back to college after the summer, I want to leave my machine at home (6 hrs away) ...
2
votes
0answers
60 views

Can I ssh to a server through a pptp tunnel? [closed]

I'm new to VPNs, so there's a good chance I'm completely misunderstanding my needs here. My workplace is setup so that I can only ssh into its servers when either (a) I'm using a computer in the ...
2
votes
3answers
3k views

Use socks proxy for commands in terminal

I connect to a remote ssh server by running this command: ssh -D 12345 bob@myserver.com This creates a socks proxy that I can use with Firefox to bypass censorship in my country. However, I can't ...
0
votes
1answer
41 views

git, setting up remote repository without ssh

I want to set up a remote git repository on a openSuse machine, and I have the following question. Do I really need ssh on the machine, to set up the remote git repository? Initially is it possible ...
7
votes
3answers
4k views

Redirect stdout over ssh

I would like to run something > file on a remote system through ssh, but if I run ssh host something > file the redirection is executed locally as ssh etc > file I've tried it with ' ...
14
votes
3answers
12k views

How can I tell what version of linux I'm using?

Often times I will ssh into a new client's box to make changes to their website configuration without knowing much about the server configuration. I have seen a few ways to get information about the ...
1
vote
2answers
69 views

How to fix 'set -o emacs' in .bashrc not working in ssh shell

I work in an LDAP-based user and host network. My user exists on all hosts since it an LDAP user, and my user's home directory exists on all hosts as a mountpoint. I have ~/.bash_profile set up to ...
0
votes
1answer
36 views

Can I use `screen` to keep an ssh tunnel alive from the client?

I read here that you can keep your ssh sessions alive a bit longer using a utility called GNU screen. Is it possible to keep an SSH tunnel alive longer with this as well?
1
vote
4answers
58 views

Allow guest SSH login and redirect to a program

Sometimes I get really silly ideas. This time, the idea is to deliver an easter egg for anyone who decides to try and connect to my server via SSH. Doing so will run a program, such as easteregg.sh, ...
2
votes
1answer
162 views

Generate own (stronger) RSA host key for OpenSSH?

I would like to replace the default 2048 bit host key generated when installing OpenSSH or starting it the first time with one of 4096 bit length. This leads to two questions: Does OpenSSH allow ...
3
votes
1answer
53 views

What is the best way to create remote tunnel?

I have 3 Linux servers: 10.0.0.0/24 - (10.0.0.10) Linux server inside my LAN. 20.0.0.0/24 - (20.0.0.10) Linux server with HTTP Apache server 50.50.50.50/32 - Server on Amazon AWS which see ...
0
votes
0answers
58 views

Lazy mount of remote filesystem (with sshfs)

I have a remote computer, and I mount its filesystem with sshfs to my local folder ~/user@host, like that: sshfs user@host: ~/user@host Works nice, but I want to implement "lazy" mount: i.e. I ...
2
votes
1answer
768 views

channel 1: open failed: administratively prohibited: open failed

I am trying to set up an SSH tunnel (on a Raspberry Pi) with the following command: ssh user@terbank.cs.kuleuven.be -L 5672:tabor.cs.kotnet.leuven.be:5672 -N (I should note that I can, or at least ...
3
votes
2answers
254 views

Automating backups run from a bash script in Linux the right way

I have a bash script I wrote to backup a Moodle installation. It works fine, I've tested the backups, but there's a problem with it; when I do the backups, since I have to use sudo to type the ...
4
votes
5answers
7k views

How can I page up or down in tmux with Terminal.app?

I have tmux installed. But I can not scroll up or down. I.e. as soon as I tmux I get only a portion of the screen and can not scroll up. crtl-b + Page Up does not work since I am in Mac and I can not ...
3
votes
3answers
95 views

How can I automatically log in to a list of servers to prevent account lockout?

I have started a new contract, and need to have an active account on almost 200 servers. Security has accounts lock after 30 days of inactivity, as well as if you do not log in within 1 hour of ...
1
vote
1answer
27 views

View blocked address from sshguard

How can I view all the addresses that sshguard has blocked to iptables?
3
votes
2answers
105 views

Logging SSH access attempts

I've configured an ubuntu server with openssh in order to connect to it and execute commands from a remote system like a phone or a laptop. The problem is... I'm probably not the only one. Is there ...
5
votes
2answers
110 views

Terminate dropped SSH sessions

My SSH sessions seem to be dropping though that is not my major problem - the major problem is my previous sessions are still alive, worse yet one of them is running visudo preventing me from ...
1
vote
1answer
37 views

How to fix SSH on OSX?

I have been able to connect to OSX machine using ssh client successfully for hours, but then it stops working and I get connection refused. ps -ax | grep ssh 841 ttys004 0:00.00 grep ssh Using ...
3
votes
2answers
110 views

Allow a user to run a single command as root over ssh

I have a user account that is not designed for logging in interactively, but want to allow it to run a single command (as root). Is there a better way to accomplish this (without granting more rights ...
1
vote
1answer
37 views

su to another user using ssh keys?

Assuming that user_A and user_B set up and exchange public ssh keys with each other, is it possible for user_A to su into user_B on the same machine?
1
vote
1answer
32 views

Connecting to Github from server

I am trying to connect to Github from a server running Jenkins. To do this, I'm copying my public key from another server, into the authorized_keys on the new server. All I'm getting is the ...
2
votes
2answers
207 views

Specify identity file (id_rsa) with rsync

I need to make periodic backups of a directory on a remote server which is a virtual machine hosted by a research organisation. They mandate that access to VMs is through ssh keys, which is all good, ...
2
votes
3answers
104 views

Number of SSH connection(s) on a single linux machine

I landed up in a situation wherein I had to access a Linux machine via puTTY.I made various attempts to SSH but failed to connect to the machine. I then realised my colleague was accessing the same ...
2
votes
1answer
50 views

SSH tunnelling outgoing traffic shaping

I am using an OpenSSH server for a client app that uses the traffic forwarding, SSH tunnelling and some users are consuming an extraordinary amount of bandwidth. Is there a way to shape the traffic on ...
1
vote
2answers
3k views

Bash script calls expect script with master SSH connection

I'm trying to write a bash script that calls an expect script to establish a master SSH connection to be used for the remaining SSH commands in the bash script. ~/.ssh/config: ControlMaster auto ...
4
votes
2answers
2k views

SSH window forwarding with Xming

I have installed fedora 17 on the old desktop computer and put it to DMZ of my NAT network - i.e. whole computer is accessible via public ip address to the internet and could be called "server". I've ...
1
vote
2answers
549 views

How to forward port by (sub)domain name?

I have this setup: a (Host) FreeBSD 9.2 host server running VirtualBox with another (Guest) FreeBSD guest server. I have set up port forwarding on the Host to the Guest like this: VBoxManage ...
3
votes
2answers
77 views

Get ssh server key fingerprint

Is there a way to programmatically obtain a SSH server key fingerprint without authenticating to it? I'm trying ssh -v user@host false 2>&1 | grep "Server host key", but this hangs waiting for ...
3
votes
1answer
217 views

Unable to get the right exit code from a script

I have a script which connects to a remote server via SFTP and get some file from there. My script goes like this: /usr/bin/sftp USER@remote.server.com <<EOF lcd /dir1/dir2/dir3 cd ...
2
votes
2answers
144 views

Why does SSH show protocol as tcp6 *and* tcp in netstat?

$ netstat -nat Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:80 ...
2
votes
1answer
226 views

SSH Setup - How will the router know my computer's ip?

I'm very new to the networking side of the house and am trying to set up SSH on my new Ubuntu machine. I have my DD-WRT router working with DDNS now and can log in to the router page -- but I'm not ...
1
vote
1answer
187 views

SSH Login Alert Using pam_exec

Hi I have been trying to follow the information about pam_exec from here: Ssh login hook? When a user log's in they get: /etc/pam.d/email-alert.sh failed: exit code 8 My sshd file has this at the ...
3
votes
2answers
64 views

using ssh-agent

I have my desktop in the office. When X starts, ssh-agent starts automatically. I have to add my SSH key once, at the beginning, and then I can use ssh without having to enter my password each time. ...
2
votes
1answer
169 views

Shellscript! Syntax error: unexpected “(”

Update: After the changes from the first answer I got some more error codes. : not found: line 23: { esxidown.sh: line 24: redir error Insufficient arguments. : not found: line 26: esxidown.sh: ...
3
votes
1answer
57 views

Unrar local files to remote server

I have two Linux servers, one which has several RAR files and another empty one. I would like to extract the archives and move the content to Server 2. The problem is: I do not have enough storage to ...
1
vote
1answer
242 views

How can I start tmux automatically in fish shell while connecting to remote server via ssh

I switched from bash to fish shell. I liked it and decided to use it on my servers also. How can I start tmux automatically on ssh connection? I followed this instruction for bash but fish shell is ...
0
votes
4answers
3k views

How can I share files between two Linux machines over LAN?

I am currently running Fedora 18 with Gnome on two computers which are connected to the same router. I have been using Samba to share files between the two, but I know there must be a better way. On ...
1
vote
1answer
129 views

Login via ssh without password, getting authorized_keys file removed after first login attempt

I'm trying to configure passwordless login via ssh. I have Centos 6.5 This what I did: copied content of id_rsa.pub from my client machine to ~/.ssh/authorized_keys set permissions 700 to ~/.ssh and ...
1
vote
1answer
30 views

osx server, windows client, running emacs opens it on server not client

I've installed emacsformacosx on my OSX box. I'd like to shove my macmini in a data center and run it headless. I've gotten x-windows working. If I run xeyes, it displays on my Windows 7 client. ...
4
votes
1answer
240 views

Use different username by default for a specific host

I have a different (assigned, non-changable) username on one of the servers I log to regularly, and I would like to avoid writing it down every time. Can I make these lines [tohecz@localhost ~]$ ssh ...
5
votes
1answer
73 views

Require private key for sudo

For added security, I would like to require a private key to use sudo on my Ubuntu Server box. I've added private key authentication for sudo as described at ...
0
votes
1answer
34 views

Unrar local files to remote server [duplicate]

I have two Linux servers, one which has several RAR files and another empty one. I would like to extract the archives and move the content to Server 2. The problem is: I do not have enough storage to ...
0
votes
1answer
83 views

scp to Local Machine After SSHing [duplicate]

From my local machine I can copy files from a remote machine scp remote:/some/file/path ~ But what if I'm already SSHed into the remote machine? Can I do something like this ssh remote cd ...
1
vote
1answer
59 views

autossh won't run in background

I try to set autossh to run at boot adding it to /etc/rc.local but I am unable to even get it to run in the background. This is the crucial part of my config file: Host remotehost.com LocalForward ...
2
votes
2answers
308 views

How is using a public-key for logging in to SSH any better than using a password?

I'm not asking about password vs key authentication. I've seen a few times (and even Amazons AWS) says that even if SSH has a major vulnerability that key authentication would make such an exploit ...
1
vote
2answers
69 views

Create a user that can only connect to a specific directory

I've created a SSH folder for some friends. I've created the users to log in via SSH, but they connect to ~ how can I set to which folder they can connect? I have a directory called /usbdrv/ which ...
1
vote
2answers
556 views

How to use `~/.ssh/config` setting for each server by `rsync`

I'm now using rsync with -e 'ssh -p 10022' option to specify the port. I have already ssh setting in ~/.ssh/config. Host myvps HostName example.com User ironsand Port 10022 Can I use this ...
5
votes
3answers
527 views

Run ssh login command without modifying remote .bashrc

We have a bunch of servers set up with set -o vi in their ~/.bashrc. It would be nice to be able to ssh into these boxes and automagically run set -o emacs as a timesave. I've seen a solution ...