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

learn more… | top users | synonyms

1
vote
1answer
57 views

Issue with ':' character in Bash script over SSH

I am currently writing a script that will perform backups on a set of databases, comress them, encrypt them, transfer them to a separate storage machine, and verify that the file made it successfully. ...
1
vote
1answer
27 views

How to programatically control X11 forwarded apps?

I'd like to set-up X11 Forwarding to run remote X applications on the server and X11 client can handle the UX interaction. However I would like to configure the X11 client or fake it to actual do the ...
4
votes
1answer
673 views

How do I stop ssh-agent trying all keys with agent forwarding?

Often I'll connect via SSH to VM instances to deploy code from private Bitbucket repositories, cloning repositories via git over SSH. Today I was getting the error: conq: repository access denied. ...
1
vote
1answer
817 views

DROP all for port 22 if not geoip set of US for iptables and xtables

I want to simply block all ssh access from anywhere but with in the US. This is my whole iptables, and I have followed ...
1
vote
0answers
10 views

Chroot Users to /opt and subdirectories [duplicate]

I'll make this short and hopefully I make sense. Im trying to give a user ssh access, but, he/she must only be able to access /opt and the few subdirectories that live under it. However, here's ...
13
votes
3answers
2k views

scp between two servers not in the same network

There are two server that I can access with 2 different VPN connections. I have managed to have both VPN working on the same time on my machine (a bit of routing rules). I want to do a scp ...
1
vote
1answer
584 views

iptables allow only ssh and vpn traffic

I have dedicated server with ubuntu 14.10 installed. The server should connect to an openvpn server and the traffic should only go through the vpn, except for SSH traffic. My idea is to realize it ...
1
vote
0answers
31 views

How to use tty allocation to run GPG through SSH?

I am trying to encrypt and sign a local file using a distant GPG installation via SSH: pv file | ssh -tt [ssh server] gpg -se -r [receipt key] > file.gpg Using the double t option removes the ...
4
votes
1answer
16 views

How do I configure SSH so that OTP can be used with ssh-copy-id and then only keypair authorization is accepted?

As you may be able to tell from the title of this post, part of my confusion may stem from an inability to express the question, so please bear with me. Here is what I am trying to accomplish: ...
0
votes
1answer
36 views

How do I run X11 applications over ssh from a Gentoo server that does not have a GUI installed (with minimal added software)?

Currently I am renting a VPS from VPS.net running Gentoo. How can I run "X11" applications remotely without installing a full GUI on the VPS. What is the minimum pieces of "X11" I would have to ...
0
votes
1answer
19 views

running screen in a shell can't find sessions but running screen during ssh login can

I am using the RemoteLoginAutoScreen script to start a screen session when I ssh into a host. Differences from linked script: I am using zsh and the RemoteLoginAutoScreen uses bash The problem that ...
0
votes
1answer
566 views

ssh connection closed, after prompting password [on hold]

I'm using a debian based distro for Raspberry Pi (Raspbian). Sometimes I cannot ssh to my Pi. A reboot solve the issue, but I don't always have physical access to the Pi. here's what happens: ...
2
votes
2answers
53 views

Git config forwarding

I don't know if this even possible or not. I was wondering if there is any way like SSH Agent forwarding by which we can forward our .gitconfig on the remote server, and git automatically picks the ...
-1
votes
0answers
37 views

How to configure ssh settings? [on hold]

I have an access to an aws server deployed through Rightscale. Rightscale generates a .jnlp file to ssh into the server from local machine which actually runs on java code for doing it. I want to do ...
0
votes
1answer
645 views

Run a command under sudo over SSH

I am accessing remote machine in Linux using Bash scripting.My code is as follows #!/bin/bash ssh -i manu_bp.pem ubuntu@54.68.67.68 <<EOF sudo -s cat ...
26
votes
5answers
10k views

How can I detect if the shell is controlled from SSH?

I want to detect from a shell script (more specifically .zshrc) if it is controlled through SSH. I tried the HOST variable but it's always the name of the computer which is running the shell. Can I ...
0
votes
1answer
17 views

X11Fowarding not working on Arch Linux ARM

I am trying to setup X11Forwarding between my Arch Linux ARM server and my OSX computer. I am accessing the server locally (always). /etc/ssh/ssh_config: X11Forwarding yes AddressFamily any ...
2
votes
0answers
23 views

Flash OpenWrt Routers from Telnet

I have two routers. One has Chaos Calmer and the other has Attitude Adjustment. When I turn them on and check arp, nothing comes up. When I check route, the hardware address says (incomplete) but the ...
2
votes
1answer
756 views

SSH Agent Forwarding on server

I'm struggling with the concept of SSH Agent Forwarding. This is what I've done so far: Create default identity local (ssh-keygen) Install the public key on bitbucket Now I want to connect to a ...
0
votes
1answer
34 views

ssh over unix pipe or pty device [closed]

Ok, I don't even know how to put this into words. I have a /dev/myDevice which automatically connects to some ssh server when opened. How do I connect to it with ssh? Is this even sane? If it's insane ...
1
vote
1answer
22 views

Pinentry fails with gpg-agent and SSH

I'm running Fedora 22. I'm trying to setup GnuPG to have my SSH connections authenticated using my PGP authentication subkey that is located on my Yubikey Neo. I have a systemd unit starting the ...
2
votes
2answers
36 views

How can I maintain open ssh connection and use it from shell scripts?

Currently i invoke the following: $ ssh me@host.com my_cmd This is slow and not easy to automate safely. I would like to establish ssh connection once and have some script that will forward my ...
5
votes
3answers
34 views

How to make SSH's `ControlPath` distinguish between IPv4 and IPv6?

I'm using ControlMaster auto ControlPath ~/.ssh/tmp/%l_%r@%h:%p in my ~/.ssh/config to open multiple sessions using the same connection when accessing a host via SSH. That works fine for ...
1
vote
0answers
86 views

Give a user permission to one folder

I have made so my group "sftponly" can access the users home folder. But right now the user in the group don't have permission to other folders, but they have permission to see them. How can I do so ...
0
votes
0answers
19 views

Why won't MOTD display output from a Python script it calls outside of /etc/update-motd.d/ unless it's in this directory?

The Situation We're running a headless Ubuntu 14.10 Server to fulfill various needs and tests. I was experimenting with changing the MOTD for SSH sessions via /etc/update-motd.d/ so as to display ...
0
votes
1answer
49 views

Why the number is rounded over ssh? [duplicate]

localhost:~ $ df -k / | awk '{print $3/1024/1024/1024}' 0 0.00618061 localhost:~ $ ssh localhost "df -k / | awk '{print $3/1024/1024/1024}'" 01 01
2
votes
0answers
17 views

Rlogin prompting for remote password (Kali / Metasploitable)

I am following a tutorial that can be found here. http://www.kalitutorials.net/2014/05/metasploitable-2-vulnerability.html Specifically the "Remote access vulnerability - Rlogin" section. When I ...
1
vote
1answer
13 views

Working with screen via another screen session

I connect to Host1 using ssh and start a screen session. From one of those windows I ssh into the Host2, which launches a screen session on login. How can I create new/switch between screen windows ...
0
votes
0answers
34 views

SSH multi hop with certificate

I need make a SSH multi hop connection from A --> B --> C B is a bastion host and C is the target. In my client (A) we are the two SSH certificate, for B and for C, how to make a connection to C ...
2
votes
1answer
1k views

Chroot gone wrong, can't ssh with user

Distribution: Scientific Linux 6.5 (Carbon), not exactly your typical brand of linux. Tried to chroot a user using these instructions for SSH and quite obviously failed, and now I can't even log in ...
3
votes
1answer
26 views

Disabling ssh password authentication does not work on my debian VPS

I have a Debian 7 VPS setup. I just enabled SSH Key authentication and disabled password authentication but the disabling did not work. When I attempt to SSH into my VPS, it prompts me for my SSH Key ...
6
votes
0answers
2k views

git-upload-pack hangs indefinitely

I have the following call structure: Jenkins runs fab -Huser@host set_repository_commit_hash:123abc. set_repository_commit_hash runs git fetch with pty = False. The child process ssh git@github.com ...
2
votes
2answers
39 views

transfer many similar files over ssh

A service on a linux server is only able to do full backups, where each backup is a .tar archive (no compression). Many contents of the archive do not change from day to day. Each .tar file size is ...
0
votes
0answers
14 views

OpenWrt with Nodogsplash

I have a web application in MVC4 for Hot Spot Management system. I using it with OpenWrt and Nodogsplash, Now i need to authenticate the users in to external website. Is there any way to allow to ...
0
votes
0answers
10 views

ssh over https, python server [migrated]

My ssh client connects successfully to sshd on my server at home through https port with the help of sshttpd on someport which multiplexes traffic to either httpd on port 443 or sshd on port 22 ...
0
votes
0answers
26 views

Error installing java on Virtual Machine

I am trying to deploy a server app (BaasBox) to Google app Engine BaasBox requires java 1.6 or higher to execute. when I check for java on the virtual machine using java -version, I get this: ...
2
votes
2answers
38 views

Simple notification on program completion

I'm running something while ssh'ed into a machine (through mosh). I would use sendmail to get a notification on termination of a program, but this machine cannot connect to the network for security ...
0
votes
3answers
1k views

Script SFTP with password - HP-UX

I would like create a script in HP-UX to send in sftp with password. I have this command sftp -o PasswordAuthentication= but if I answer yes or no after, I have this issue "Host key verification ...
2
votes
1answer
683 views

Directx application using wine over ssh -x

I'm trying to run a Windows app (Artemis video game - server mode) on my archlinux server. As it is an windows application I have to run it using Wine. As I'd like to be able to launch the server ...
3
votes
1answer
52 views

Possible to pipe command using su via ssh

I'm trying to write a python script to remotely update the login passwords for a set of account I administer - I can already successfully use python to pipe remote commands via the stdin of an ssh ...
1
vote
1answer
17 views

dropbox process stops when I log out of ssh

I tried every solution from How to run Dropbox daemon in background? and nothing solves my problem: Basically, I already installed dropbox on my Ubuntu 12.04LTS headless server. I got init.d setup ...
0
votes
0answers
29 views

SSH connection breaks after executing commands (broken pipe)

I am connecting to a remote machine on WAN and LAN networks using SSH. After logging in with username & password I type some commands in the shell. After the 2nd or 3rd command PuTTY throws the ...
1
vote
3answers
5k views

How can I scp a file that my user can't read but I can sudo?

Can I use scp to copy a file from a remote server which my login user can't read, but where I have permission to sudo to root (without password even)? How?
0
votes
1answer
83 views

Why can't I use ssh?

The problem seems to occur straight from the time I have installed Ubuntu 14.04 LTS. I first realized this problem when I was trying to connect with my hosting at HostGator. I neglected and thought ...
1
vote
0answers
37 views

How to capture tail -f output from remote host indefinitely

I am trying to monitor a remote, embedded host that is writing output to a file: /var/log/myapp.log This host may lose power for hours. The app may be killed and restarted. On my local machine, I ...
0
votes
0answers
47 views

Difference between ssh manually and in a script

I am using AIX. I am trying to open pvcs Serena application which is present in a Linux server. If I manually ssh to Linux server, set DISPLAY variable and invoke pvcs it is working properly. However ...
3
votes
2answers
85 views

SSH Connection Timed Out

Hi I have looked all over the internet but could not find a solution. I am not saying that I didn't find anything, I am saying that I tried so many things and nothing worked. So hopefully someone can ...
58
votes
15answers
89k views

SSH tunneling error: “channel 1: open failed: administratively prohibited: open failed”

When I open this ssh tunnel: ssh -nXNT -p 22 localhost -L 0.0.0.0:8984:remote:8983 I get this error when trying to access the HTTP server running on localhost:8984: channel 1: open failed: ...
1
vote
2answers
78 views

How do I scp a file from server A to server B from cron?

I have a file in server A which I am able to do transfer to server B using scp. I need to do this through a cron entry. server B has a password. How do I perform this?
45
votes
6answers
54k views

How can I run ssh-add automatically, without password prompt?

I want to communicate between several computers on my network (static ethernet), through ssh. In order to do that I need to run ssh-add every time I login on specific machine, how can I do it so that ...