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

learn more… | top users | synonyms

2
votes
1answer
43 views

SSH config file + shell script help

Well, what I want to do seems a bit convoluted but its the only way I can think of to get the result I want. So here goes. I want to automate ssh to my Pi, in the following fashion: My Pi boots up ...
2
votes
2answers
19 views

Allow multiple remote connections to an ssh Dynamic forwarded port

Let us assume I have three machines A - Server to which I am sshing to B - Client from which I am sshing C - Another Client in B's subnet Now, I set up dynamic port forwarding for port 1235 by ...
1
vote
1answer
43 views

Password-Less SSH Login not working [on hold]

I create a SSH Key file on Server A using RSA method ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/oracle/.ssh/id_rsa): Enter passphrase (empty ...
0
votes
2answers
35 views

reject ssh connections made from proxies

I was seeing this question which was concerned with blocking access to the users who do not belong to a particular region. I am sure that blocking is possible but I see there is a workaround to this. ...
0
votes
0answers
22 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 ...
0
votes
3answers
21 views

Is there a log for sshd where I can see who has used ssh to access my PC? [duplicate]

I am running the OpenSSH daemon (sshd) on CrunchBang Linux, and I want to see a history of who (i.e. IP address) has logged in using SSH.
1
vote
1answer
8 views

CentOS 6.4: SSH RSA key issue, “[…]== rsa-key-20140711\n failed”

For some reason sshd is reading from my authorized_keys file a new line that does not exist. I generated the keys with puttygen, copied the public key text in as required, concatenated the key into ...
1
vote
0answers
22 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 ...
1
vote
2answers
54 views

Locked myself out of Amazon EC2 SSH - This service allows sftp connections only

Doh. Locked myself out of SSH on an Amazon EC2 box after fiddling with ForceCommand internal-sftp in /etc/ssh/sshd_config in order to allow root log-in via SFTP. SFTP still works fine, but PuTTY ...
3
votes
3answers
41 views

Monitor all login attempts

Few weeks ago I thought it would be a good idea to write a script to send me an email whenever some user logs in into my server. So I came with a perfectly working script notifyLogin.sh, then I ...
2
votes
0answers
21 views

Can't figure out why ssh_exchange_identification: Connection closed by remote host appear

At home, I have setup a Raspberry Pi with the latest version of Raspbian and with ssh enabled. I also use a Mac Book Pro with OS X 10.9.3. I use ssh pi@192.168.0.22 to do some work on the Raspberry ...
1
vote
0answers
36 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 ...
0
votes
5answers
56 views

Downloading file through SSH with a “proxy” machine inbetween

I need to download a file from machine C to machine A. To do that, I need to login to machine B (I am doing this using scp), as I cannot access C directly from A. Would it be possible to download a ...
1
vote
1answer
20 views

SSH and certificates - how to connect?

My geeky friend has dropped me this message: Debian instance has been created for you with IP address of 10.5.0.95. Remember: To connect to it, you need the certificate: ssh -i xxx.xxx ...
2
votes
1answer
20 views

ssh -X foo@host then su bar then run X app with local display, while bar also logged in?

I want to ssh into another machine, using one user account, then su to another user and run X programs as that user, with the display on my computer. The case when the 2nd user is not logged in to X ...
0
votes
1answer
20 views

Locale not being set on initial login on Raspbian/Debian [SOLVED]

Solved http://serverfault.com/a/559935 When I log in to my headless Raspbian box using putty/ssh, the locale is not being set correctly. However, if I su to another user, then su back, the locales ...
1
vote
2answers
64 views

Shell Script - how to scp into remote server and download files and protect password

I have a remote server that I need to download Apache logs from. I can manually scp into the server and get the files, but I'd like to put this in crontab. The only way to automate it is to include ...
3
votes
0answers
64 views

Can't get SSH working anymore on Debian after upgrade

I have a vServer and can only login via SSH. After the latest apt-get upgrade command, I can't login anymore and get the following error message: "Network error: Connection refused". It seems that ...
1
vote
1answer
43 views

Bash Script Display Remote Screen Session to User

I'm kind of new to bash scripting and I'm having trouble figuring out how to accomplish this. I'm working on a script that is designed to backup and manage a java application that runs within a ...
4
votes
1answer
61 views

Remotely turn off display output?

I'm using x11vnc and SSH to tunnel VNC remotely to my local machine. One of the interesting side-effects of this is that as I use my work computer from home, my coworkers will see me moving around ...
3
votes
5answers
45 views

Securely tunnel port through intermediate host

I'm looking to route a port for VNC back to my house here. I have to jump over a single host to then hop to my actual work machine. sittinghere will be my local home machine hopper will by the ...
0
votes
0answers
44 views

Cannot open GUI's via SSH connection? [duplicate]

I've just connected to a Linux terminal using an ssh client. I'm running Linux on both desktops, but cannot open PDFs, IDE, or other graphics from the ssh client. How can I fix this?
1
vote
1answer
28 views

SSH slow after configuring TCP Wrappers

We have SSH open on one of our production servers leaving it prone to various brute force attacks to break in. I reduced the attempts by changing the default port from 22. I want to further harden ...
8
votes
1answer
255 views

Using SSH to connect to a new server without storing the host keys in the $HOME/.ssh/known_host file

I get the following output if I run the following command: -bash-3.2$ ssh -o "StrictHostKeyChecking no" 192.168.1.77 Warning: Permanently added '192.168.1.77' (RSA) to the list of known hosts. Last ...
3
votes
0answers
55 views

SCP Lost Connection

I can successfully connect to my server via ssh but when trying to run the scp command I get a connection time out. $ scp ~/.ssh/id_rsa.pub root@192.168.12.2:id_rsa.pub ssh: connect to host ...
0
votes
1answer
33 views

Backup of data from Linux PC [duplicate]

I have Linux PC, for which monitor is not working. But I am able to log in through SSH. I want to take a backup of all the directories from this PC. Instead of changing directories one by one and ...
2
votes
3answers
47 views

force ssh to change dir after login based on config

Is there any way to force ssh to change it's working dir in ~/.ssh/config or by using other configuration files? I have a lot of servers with different environments. Each environment is installed in ...
2
votes
1answer
41 views

SSH'd into a computer, uptime / who / users report 0 users?

I'm ssh'd into a server. Why doesn't the server report it? # uptime 21:54:28 up 13 days, 3:47, 0 users, load average: 1.18, 1.11, 1.13 # users # who I'm not really sure I understand it ...
2
votes
0answers
41 views

SSH AuthorizedKeysCommand and SELinux

I'm trying to use the SSH AuthorizedKeysCommand in a CentOS 6.5 machine, but I'm encountering an SELinux error. When I switch SELinux to permissive mode - using setenforce 0 - it works, but when I ...
4
votes
1answer
57 views

Executing commands with ssh and shell script using variables on a remote machine

I'd like to execute a command and script located on a remote machine with a script on a local machine. I know it's possible to execute these kind of commands with ssh, so I made: #!/bin/bash ssh ...
5
votes
1answer
63 views

Why does ssh -g say that address is already in use?

I setup an SSH connection with port forwarding that allows remote hosts to connect to the local forwarded ports like this: ssh -g -L 5115:localhost:5115 <server> The connection works fine ...
4
votes
2answers
58 views

777'd some files. How do I repair SSH?

So I'm messing around on a test server and accidentally ran the following (which resulting in SSH breaking): # chmod -R 777 /var Because it's a test server, I'd rather not re-install right now, I ...
2
votes
1answer
26 views

What commands does git use when communicating via ssh?

Using command="" in authorized_keys, I can restrict the commands that can be run by a particular key. What commands do I need to allow in order to have a functioning git remote? From the Pro Git ...
3
votes
2answers
112 views

ssh-add in not persistent between reboots

I add a ssh key to the agent by $ ssh-add ~/.ssh/id_rsa_mac Identity added: /Users/alex/.ssh/id_rsa_mac (/Users/alex/.ssh/id_rsa_mac) After reboot I don't have this key added anymore: $ ssh-add -l ...
0
votes
0answers
33 views

Unable to SSH into Puppy Linux, even though SSHD is running

I installed OpenSSH client and server on my Puppy Linux computer. That computer is behind a router. I tried to ssh into it over the internet (outside the router) but it times out. Also doesn't work if ...
1
vote
0answers
15 views

xtightvnc through ssh gateway — connection refused

Following setup: homepc -> gateway -> workpc workpc:~$ tightvncserver :12 homepc:~$ ssh -N gatewayuser@gateway -L 1212:workpc:5912 Now I try to connect via homepc:~$ xtightvncviewer ...
1
vote
1answer
78 views

SSH: Network is unreachable (caused by router)

I've searched solution in Google for 3 days, when I decided to write here. I have a router, so in my house is WLAN. I use laptop when I stay at home. In another city in my office I have a second ...
1
vote
2answers
40 views

Using exec in find over ssh from shell script

So, I am attempting to execute the following from within a shell script; ssh -q $CUR_HOST "cd $LOGS_DIR; echo cd $LOGS_DIR; find . -name *.log -mmin +1440 -exec gzip {} \; exit" When this runs, it ...
0
votes
2answers
59 views

Locked out of Ubuntu machine

I recently made changes to my EC2/Ubuntu instances by installing OpenSSH, before I was able to SSH just fine, however now I'm getting this error: ssh: connect to host shopious.com port 22: Connection ...
1
vote
5answers
79 views

How to copy a file from a remote network to the local desktop

So I used SSH to remotely login to another computer on a network. I have many files that I would like to copy over to my local desktop. I am trying to follow this How-to : However, I think one ...
0
votes
0answers
34 views

SSH can't use internet when multiple interfaces present in route

I'm trying to make SSH tunnel connection on any possible interface (which has internet connection). I'm currently using ppp0 and eth0 interfaces. ppp0 always has internet and reinitialized if ...
-3
votes
1answer
38 views

Authentication failed [closed]

You have no controlling tty and no DISPLAY. Cannot read passphrase. warning: Authentication failed. Disconnected (local); authentication cancelled by user (Authentication cancelled by user.). ...
8
votes
2answers
100 views

Weird SSH issue, ssh works with -t but freezes without it

When I ssh into one of my servers, it seems to log in, but then hangs before giving me the prompt (message debug2: shell request accepted on channel 0 is the last log entry). Though the odd thing is ...
2
votes
1answer
75 views

Why do I need to insert the passphrase for an RSA key on a remote host after SSH?

From host B I can SSH various other hosts (C, D) without using any password as I put the public key in the correspondent authorized_keys files (in hosts C and D). From host A I can SSH host B (via ...
2
votes
0answers
35 views

Remote script cleaning up

I run a remote script using ssh: local script: local_command ssh -p 222 user@server 'sh -s' < ./remote_run.sh remote script: some_command & sleep 10000 trap 'echo exiting' SIGINT SIGTERM ...
0
votes
0answers
32 views

Root able to login but non root users are denied - PAM

One of our servers is not letting non-root users login, but root can login without any issues. The following are the messages from /var/log/secure: Jun 24 18:08:43 jonnserver sshd[14470]: debug1: ...
1
vote
1answer
49 views

login scenario and root ssh access block

I'm kinda new to linux so bear with me. I followed a tutorial on how to grant root access to other users and what I did was, in /etc/passwd/ I changed the other users' uid/gid to 0:0. The problem is ...
0
votes
2answers
72 views

why won't x11 display work through ssh login?

I have logged in to a remote server and am trying to display an x application(e.g. firefox). but an error message appears. the below are my attempts to open firefox Black@Black-PC ~ $ ssh -X ...
1
vote
1answer
84 views

Linux can't recognize the right password when ssh'ing?

I've created a local port forwarding and I was trying to ssh into my own port. During the process, I found that my own Linux won't recognize me even when I have the right password ...
1
vote
3answers
322 views

what does this ssh command mean?

Its an answer I got from questioning about port forwarding but I'm not sure what it means.. $ ssh lab_desktop -L 2200:lab_server:22 -vvv my wild guess: first get connect to lab_desktop and then ...