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

learn more… | top users | synonyms

60
votes
16answers
92k 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: ...
2
votes
2answers
36 views

Using reverse SSH tunneling in one step instead of two steps (with -X)

Suppose we have three hosts: miki - my computer behind a NAT vps0 - my VPS mum - computer of my mother, behind a different NAT. The task is to connect from my computer to my mum and keep X11 ...
1
vote
1answer
38 views

SSH Tunneling - Local and Remote Use Cases

I just learned the basics of SSH tunneling from googling. I saw this interesting question: How does reverse SSH tunneling work? But I still find it a bit confusing, more specifically on the ...
2
votes
1answer
36 views

No colour in MOTD

I recently bought a Raspberry Pi, and have started playing around with it. After changing my MOTD, (to include colours), the colour codes are coming up as raw-text instead of executing. I am ...
2
votes
0answers
26 views

Paste clipboard content without X

I'm sshing into ArchLinux machine from Ubuntu. I want to be able to copy some text from Ubuntu and paste it into a file in Archlinux from terminal. xclip doesn't work for me, because I'm unable to set ...
2
votes
0answers
14 views

restrict private apt repository with rssh - why does apt-get try /bin/sh?

I am trying to set up a private repository via ssh. My sources.list.d/ contains the entry deb ssh://user@host:/repo ./ user is a certificate only account on host. apt-get update works fine. ...
0
votes
2answers
39 views

How to scp self?

I want to scp from myself to myself, but am getting Permission denied (publickey) errors. This is more of a edge case of a script, but I feel like there shouldn't be an issue with it. ifconfig | ...
4
votes
1answer
38 views

using ssh and running a script in background

I am running a job that takes about 20 minutes in each server. However, all the servers can run this job at the same time. Here is my job: #cat mylist server1 server2 ... ... #for i in `mylist`; ...
10
votes
1answer
520 views

How to execute an arbitrary simple command over ssh without knowing the login shell of the remote user?

ssh has an annoying feature in that when you run: ssh user@host cmd and "here's" "one arg" Instead of running that cmd with its arguments on host, it concatenates that cmd and arguments with spaces ...
0
votes
0answers
40 views

server1 ssh's to server2 but server2 sees server1 by it's private ip due to both servers being on the same firm/network

I ssh into server1 via it's public IP from server2. I then ask server1 what my IP is. i.e. server2's IP. It shows me server2's private IP. I want it to show me server2's public IP. If server2 was ...
0
votes
0answers
45 views

Is there a tutorial to set up a shared hosting server?

I can't find a tutorial on how to set up a shared hosting server. The part that I'm missing is the way privileges are set for the webmasters so that they don't see each others directories. ...
5
votes
2answers
310 views

How to allow direct root access via SSH on certain IP range?

I would like to login to root via ssh directly while at home (192.168.1.0/24). But while outside (e.g. at work), I can still login via ssh by using one of the custom accounts I created. I jus ...
0
votes
1answer
40 views

piping a password located in a file to the ssh command [duplicate]

So I need to login as a lot of different users to a server using ssh and I'm tired of copying the password from the files, which contain the passwords for the users, each time. I can't change it to ...
0
votes
1answer
35 views

tail file from remote server and nslookup on local

I need a script for resolve hosts. For now I run this script on local machine for i in `tail -F access.log | awk '{print $8}' | awk '{gsub("http://|/.*","")}2' | awk '{gsub("http://|:.*","")}1' | ...
2
votes
2answers
325 views

Autofs home directories with passwordless logins

I want a setup where a user home directory is mounted on login (autofs). This is working with password based authentication. However, I want passwordless authentication, by generating public keys. ...
3
votes
2answers
59 views

How do I list available host key algorithms for an SSH client?

So ssh has the option HostKeyAlgorithms. Sample usage: ssh -o "HostKeyAlgorithms ssh-rsa" user@hostname I'm trying to get the client to connect using the servers ecdsa key, but I can't find what ...
1
vote
0answers
39 views

Wireless ssh “issue” (No route to host)

I installed Debian Jessie (gnome) on one of my machines today and it went smoothly except for the wifi. Calling this machine A, I set up an ssh connection with machine B (using an rsa key) and then I ...
0
votes
1answer
2k views

How to execute Netscaler commands through a remote machine via SSH connection

I have been trying to execute some NetScaler commands like "bind" & "unbind" through a Linux Box via an SSH Connection. Now the Problem is, Manually we are able to enter & execute commands on ...
1
vote
1answer
31 views

A way to keep dotfiles and configuration with ssh

I'm using vim, tmux and zsh. I love those tools I passed a lot of time to configure those tools, particularly Vim. In my day to day job, I have to access to a lot remote machines. I use ssh to be ...
1
vote
2answers
3k views

SSH failed public key authentication

I have a server, and I want to be able to SSH in with two different users. I have setup public key authentication for the first user, and it works just fine, however, I can't login with the second ...
2
votes
1answer
88 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. ...
2
votes
1answer
59 views

SSH into a remote shell, execute a 'source' command, and stay in the remote shell

I've got a script, named s, on a remote server that activates a virtual environment like this: source venv/bin/activate When SSH-ed into the server, I'm able to activate the environment by . s ...
1
vote
2answers
66 views

Automatic login to multiple SSH root terminals

I am not sure if this is a security issue, or can be actually done. I would like to be able to boot up my PC, maybe run a program that will open about 5 shells, each SSH'ing to my local machine but ...
0
votes
0answers
57 views

Putty Login error through SSH (Network error: Connenction timeout)

I am trying to login into one(X) server using putty (port 22), and it is showing Fatal Error in a pop-up with the message Network error: Connection timed out. But when I am in different server(Y) on ...
5
votes
2answers
2k views

Restrict password-less backup with SFTP

I need to perform backup of a server to my computer using Duplicity: duplicity /etc sftp://backup@my.dynamic.ip.address//home/backup Before this can be done, I need to allow password-less access by ...
1
vote
2answers
55 views

Odd syntax for ssh and bash to run command

I'm pretty new to shell/bash scripting and I'm writing a script on OSX to automate some rather tedious efforts. I'm trying to run a portion of my script on a remote host using ssh. There's a common ...
4
votes
1answer
40 views

Does rsync over any type of checksum? [duplicate]

I need to transfer files from several servers to a single remote host using Rsync over SSH. However, I need to be sure that before the file is deleted on the source using the --remove-from-source ...
0
votes
0answers
17 views

SSH showing “Message from syslogd@webhost at…” after inactivity [closed]

I was logged-in on server through SSH, After few minutes of inactivity I saw following messages appeared on terminal Message from syslogd@webhost at Aug 11 08:10:30 ... kernel:nf_ct_ftp: dropping ...
0
votes
1answer
39 views

SSH Automatic login With Floating Profile

I've floating profile on server. There's no local account. All machines load same profile. I tried to use public key for automatic login without any luck. Is there any way to automatic login without ...
1
vote
0answers
45 views

Work on a remote project with Eclipse via SSH and SVN+SSH (2 remote Linux)

I have the following boxes: a) A Windows box with Eclipse CDT(or PTP) b) A Linux box,including Compiler, accessible for me only via SSH. c) A Linux box, including SVN Source, accessible for me only ...
2
votes
2answers
82 views

How can I set up one-way scp?

I've got a remote server my.server.com and I'd like to allow another user (stranger) to scp files onto the box. Goals: give as little access to the stranger user as possible stranger should not be ...
1
vote
2answers
56 views

Open the SSH Door to a Knocking Friend

I am logged into my Debian machine. I want my friend to get in via SSH. He comes to authenticate as the user friend. My machine asks him for a password. He does not know the password. I want to ...
0
votes
1answer
32 views

Start Server Remotley

I am trying to start my server remotely with this ssh root@xxx.xx.xx.xx /sbin/reboot And keep getting this back ssh: connect to host xxx.xx.xx.xx port 22: Operation timed out Why can't I start ...
2
votes
1answer
451 views

sudo -u git clone

I'm on Ubuntu server 14.04. I am using apache web server which runs as the www-data. I need to do git clone from a script (a web hook). This script will run with www-data user privilages. Running ...
1
vote
0answers
29 views

Password entry only responds to Ctrl + D, and password cannot be read

I am trying to run build-key-pkcs12 user on my OpenWRT NSLU2, to generate some client keys for the users of my VPN. Everything runs normally until I get to the enter export password part, and the SSH ...
1
vote
1answer
17 views

Running ssh from chroot jail in SuSE

I'm trying to make a server that acts as sort of an access point for lots of other machines. I want to give one user jailed access to it so they can ssh to other machines in the network. I've got ...
4
votes
1answer
12k views

Installing fail2ban on CentOS 7

I am using @GarethTheRed 's answer to this question to install fail2ban on a remote CentOS 7 server. I am able to complete all the steps up until tail -f /var/log/fail2ban.log, at which point I get ...
3
votes
3answers
48 views

How to start two processes piggie-backed? So the first finishes when the second finishes?

I'm running a script with ssh commands to a server behind a jump-host. Each time I want to run a command on my server in the secure network, I need to ssh into the jump-host (bastion) server and run ...
1
vote
3answers
1k views

Intermittent 'ssh_exchange_identification: Connection closed by remote host' error

While there are many questions on this site and others addressing this very issue, I haven't yet found one that seems to address what I'm experiencing. When trying to ssh a linux box from a MBpro ...
-1
votes
0answers
24 views

How to configure fail2ban on proftpd CentOS 6.6

I've looked every forum, fail2ban official website, everything that have word fail2ban, and every config that I tried didn't work. After reaching maxretry that I setted in jail.conf the user don't ...
0
votes
0answers
35 views

can't log in to centos 7 VPS /lib64 missing?

Never happened to me before but cannot log in as root, after typing in password it says Last failed login: bin/bash: No such file or directory Connection closed. Besides contacting my ...
0
votes
1answer
25 views

Having trouble with rsnapshot via ssh (from debian laptop) of Nokia n900

** edit 8/6/15 * So the crux of my problem turned out not to be some quirkiness with the config file. In the end it turned out I simply had multiple ssh directories in 2 different places, and was ...
0
votes
0answers
45 views

sftp (ssh_exchange_identification: read: Connection reset by peer)

I'm trying to sftp to a remote host, yet keep getting following output: $ sftp -v X.X.X OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013 debug1: Reading configuration data /home/alexus/.ssh/config ...
1
vote
1answer
5k views

Forwarding X11 not working - Error: Can't open display: localhost:11.0

LM 17 Xfce OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 Despite googling everywhere, I cannot seem to get this to work. I keep getting this error. $ xlogo Error: Can't open display: localhost:10.0 I have tried ...
4
votes
1answer
60 views

unable to connect to forwarded port over ssh

I have two servers. Server 1 has access to an Oracle instance on a server I have permission to hit but not login to via SSH. I would like to use SSH port forwarding to connect from server 2 to server ...
1
vote
3answers
47 views

Check services running on the server and restart them if they have stopped?

I am trying to write a python script which shows me the services which are running on my server. The thing is that mongodb keeps going down on the server and each time it happens I have to manually ...
19
votes
2answers
1k views

Why is this binary file transfered over “ssh -t” being changed?

I am trying to copy files over SSH, but cannot use scp due to not knowing the exact filename that I need. Although small binary files and text files transfer fine, large binary files get altered. Here ...
9
votes
4answers
28k views

What is the right file permission for a .pem file to SSH and SCP

I have tried to SSH into my AWS ubuntu server and copy the directory to my local machine. Throughout the process I experience different file permission errors (noted below). Is there one specific ...
0
votes
2answers
890 views

tmux with iterm2 attach a remote session

I'm using the Tmux integrating with ITerm2, which can create a tab in ITerm 2 for each window created by Tmux. But somehow this doesn't make much sense for the usual SSH scenario, where we first SSH ...
2
votes
0answers
55 views

“Too many open files ssh” when the number of open files is far below ulimit

I was trying to set up 2000 concurrent ssh connections, but got the error message in server log (i.e. journalctl): sshd[1356]: error: reexec socketpair: Too many open files I've set both the soft ...