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

learn more… | top users | synonyms

1
vote
2answers
212 views

SSH key authentication works with /usr/sbin/ssh -d, does not with the daemon?

CentOS x64 6.5: if I connect as root to my server and do the following: service sshd stop /usr/sbin/ssh -d I'll able to connect as user using public key authentication from my development machine: ...
0
votes
1answer
23 views

Remote execution of a file is not working

I'm trying to execute a local file (here /tmp/cmd) on a remote machine (slc05bkt) using SSH. Here's the command I'm trying from a script file: cmd="ssh -v ssuthari@slc05bkt \"bash -l -s\" < ...
1
vote
2answers
20 views

Add ssh pubkey to authorized_keys on local host (skipping existent)

I needed that to add jenkins pubkey to my host's authorized_keys when starting a docker container with jenkins. Looked for solutions, but could not find ready at internet. May seem obvious, but not ...
0
votes
1answer
26 views
+50

Setting up OpenSSH to use rhosts?

I rent a couple of VPSs running latest Ubuntu, both with OpenSSH. I'd like to try password-less login using .rhosts/.shosts. I know this is not recommended, and that it's better to use public-key ...
5
votes
6answers
174 views

Allow regular users to SSH using a private key they cannot read

Let's say I have a set of machines (called here the customers' machines) that only a small list of people (called the support staff) is allowed to SSH into, using only one account by machine (the ...
0
votes
1answer
23 views

rsync --delete did not remove file in destination while with ssh

On my RHEL6 pair of servers, I tested the rsync from server-1 to Server-2 with SSH. Everything was good as expected. However, when I moved a file under A directory, A/x.file to B/ of /home/user on ...
0
votes
3answers
42 views

Have a server on DigitalOcean only accessibly by SSH, what happens if my computer breaks?

I bought a server/droplet on Digital Ocean and per its recommendations disabled password login so it could only be accessed by SSH key. I understand the SSH security mechanism basically makes it so ...
1
vote
2answers
40 views

not able to execute multiple commands on multiple linux machines?

I have around 50 ubuntu machines on which I need to run below commands: sudo apt-get install htop sudo scp -r todd@machineA.host.com:/home/todd/pip /tmp/ sudo apt-get install python-pip sudo pip ...
5
votes
1answer
873 views

How do I prevent ssh remote login from breaking dbus?

I'm running openSUSE 11.3 on my workstation at work under KDE, I don't have root access to it. The default shell has been set to tcsh. When I am logged in at my workstation and log in remotely from my ...
1
vote
1answer
22 views

emacsclient connection refused

I am running emacs in daemon mode and I got dissconnected from the server on which it was running. After re-connect, when I run emacsclient -nc I get the error connect localhost port 6012: ...
1
vote
2answers
34 views

figure out ip addresses of all the machines remotely?

I have around 40 machines and I want to know what are their IP Address. One way is to login into those boxes and figure out their IP Address by using ifconfig command but is there any other simple way ...
0
votes
1answer
16 views

ssh -> screen -> ssh - how to kill remote screened ssh without killing original ssh session

I keep a screen session running on a dev box at work, and I ssh into my dev box and resume my screen session while I'm at work. From there, I hope to other machines. Occasionally, I find myself ...
0
votes
1answer
14 views

Showing login message when connecting to Screen

I have added this to .profile: [ -z "$STY" ] && screen -Rd "work" When connecting to a remote machine via ssh, the automatic attachment to screen is hiding the server's motd (message of the ...
0
votes
1answer
30 views

How do I run a executable .sh file on a remote server from local in its remote-existed path?

update: Sorry it seems the command is executed on remote but just not in the path of where script.sh exists. So I modified the question title from How do I run a executable .sh file on a remote ...
4
votes
1answer
52 views

forward all mysql traffic to a ssh tunnel

I have a local application that needs to connect to a remote mysql server at 40.40.40.40:3306 The main firewall blocks all connections but ssh, I can set up a ssh tunnel and connect to the server ...
3
votes
2answers
10k views

script to automate scp in network

I have a network full of Linux machines. In this network, I have a user as user1 with the password as password in all the machines. I have the following script to put files in the home directory of ...
-2
votes
1answer
18 views

Use SSH on RedHat installed on Oracle Virtual box

I have installed Oracle Virtual Box and RedHat on it. Can I use SSH or PuTTy from my local PC (Windows 7) to access RedHat locally? If yes then what will I enter in field of Host name? And if no then ...
-2
votes
1answer
36 views

Restrict bash command for specific user [on hold]

I just searched on this page, but the answer does not meet my idea. My idea is when user called Bob access ssh and run a command, for example sudo apt-get update, then the bash sheell will respond ...
4
votes
1answer
21 views

Prevent debian from hindering boot if a software-raid problem exists

I have a computer that I rarely have physical access to. All my access to that computer is done using SSH. On that computer, there's a software RAID5 using MDADM. This array contains data in one ...
0
votes
2answers
57 views

how to run multiple commands with awk via ssh?

I am having difficulty on the command below. Something is not right with the awk command. I tried putting backslash but still no good. Anyone can pin point where is my syntax gone wrong? for i in ...
1
vote
1answer
862 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 ...
3
votes
2answers
33 views

SSH: Provide additional “pipe” fds in addition to stdin, stdout, stderr

When connecting to a host with SSH, usually three "pipes" are provided between host and guest, for stdin, stdout, and stderr. Is there a command-line option to create forwards for additional file ...
1
vote
0answers
24 views

rcp stop working after ssh fail

I want to copy too many small files within my private network, I don't want to scp it, So I used rcp to make it faster and so that it runs on rshell. I had previously created ssh connection. I have ...
0
votes
1answer
26 views

Why won't my change to the sshd_config file persist? [duplicate]

I am writing a script to modify settings on my Ubuntu server. I have the following line in it: sudo sed 's/PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config The problem ...
4
votes
1answer
723 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. ...
0
votes
1answer
21 views

sshfs - transport endpoint is not connected

After reinstalling the server I can not mount it sshfs root@domain.com:/var /remote_mount fuse: bad mount point `/remote_mount': Transport endpoint is not connected update # ssh root@domain.com ...
2
votes
1answer
34 views

ssh/mosh to a remote interactive shell and run specific function

I have the following alias on my local machine: alias gom='mosh -- user@host "/path/to/specific/zsh"' I use it to connect to a remote machine with an interactive shell. I would like to modify this ...
-1
votes
0answers
15 views

Kali => ssh_exchange_identification: Connection closed by remote host [on hold]

I'm using Kali Linux to connect to a server remotely using SSH, it used to work out, but suddenly I got the message: ssh_exchange_identification: Connection closed by remote host Even though I've ...
3
votes
1answer
2k views

SSH agent forwarding, multiple hop

I tested this setup with Linux origin machine - everything is the same - only the first hop can use keys from origin machine. Initial problem I'm trying to set up SSH agent forwarding with multiple ...
4
votes
3answers
14k views

Restrict FTP user to a directory

Sorry if this is an obvious question, but I don't have a lot of knowledge about this sort of thing, and I've googled for hours, nothing worked. So on a Ubuntu 11.04 server, I want to restrict a user ...
0
votes
2answers
29 views

X11 forwarding Amazon EC2 significance of sequence number in DISPLAY variable

I am X11 forwarding from an Ubuntu instance hosted in a Amazon EC2 to my localhost. I am able to do the forwarding only when the remote (Amazon EC2) DISPLAY variable is set to localhost:10.0 I ...
7
votes
1answer
147 views

Enable Massive Concurrent SSH to a single server

My goal is to allow 10000 concurrent sshs running on a single server. For simplicity I am ssh-ing to localhost: for i in `seq 1 10000`; do ssh localhost "echo ${i}; sleep 100" >>./info ...
-1
votes
0answers
18 views

Can't access 192.168.7.2 on beaglebone black via Chrome

For some time now, I've not been able to ssh to my beaglebone either through apps like putty or via the recommended web browsers. Although cloud9 IDE works fine and I can access the beaglebone over a ...
0
votes
0answers
29 views

Can't show the content of /sdcard of my Android phone from sftp in Ubuntu's Nautilus or FileZilla

I set up a ssh server on Android using SSH Server by Ice Code App. Settings of ssh server: http://i.stack.imgur.com/ZlbzJ.jpg http://i.stack.imgur.com/b1X4i.jpg ...
0
votes
1answer
22 views

Is there a default ssh server or ftp server running on most linux distros?

I am quite new to using linux and I am wondering if, in most circumstances there is a default ssh and or ftp server running. I have started a few virtual machines and I have always been able to ssh ...
1
vote
1answer
731 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 ...
0
votes
1answer
27 views

Installed OpenSSH on Mint 17 but it doesn't seem to be running

So I've installed OpenSSH on Mint rafaela 17.2, but it doesn't seem to be running when using the modified config file. Not sure why service says its up, but I don't have a PID, don't have a listener, ...
0
votes
2answers
38 views

How to do port forwarding between localhost and localhost on two machine?

I have a local machine A, and I want to access machine C that is behind a firewall. I have access to machine B, which is on the same network of C, and I want to use machine B as a ssh server to ...
0
votes
1answer
70 views

SOLVED No SSH while loged off locally

So, I'm trying to access my laptop while I'm outside my LAN, but I have a problem, at least I think that isn't the normal behavior. I can't access via SSH if my user isn't locally logged in. I'm not ...
0
votes
1answer
25 views

Disabling openssh host key checking on LAN

If I want to specify for LAN addresses that I don't want to deal with host keys, how do I do that? /etc/ssh/ssh_config Host 192.168.*.* StrictHostKeyChecking no UserKnownHostsFile /dev/null ...
20
votes
2answers
26k views

scp and compress at the same time, no intermediate save

What is the canonical way to: scp a file to a remote location compress the file in transit (tar or not, single file or whole folder, 7za or something else even more efficient) do the above without ...
0
votes
1answer
36 views

SSH to 2 local machines via Unix server

Here is the situation: I have a Windows home machine Home which I can connect to Foo, a Unix server via ssh. Then I can ssh from my Unix work machine Bar to this same server Foo. Windows ...
0
votes
1answer
41 views

Proxy connection via SSH from one terminal to another

I have a private proxy which can be either HTTP/SOCKS, and i am renting a Linode server that i use for web-hosting. If I use a program like putty to SSH onto the webserver and run who it will display ...
3
votes
2answers
44 views

How to skip unresponsive server

I wrote a script that runs on multiple servers. Sometimes the script gets hung on one of the servers and I have to hit (control C) to end the process. If not, it gets stuck and keeps trying to ...
0
votes
1answer
31 views

Debian ssh Cannot Resolve Hostname on DHCP Server

I used to connect to my raspberry pi via ssh using the hostname of the pi and vice versa. Now that doesn't work. I can connect by using the ip address, but that changes daily and it is annoying to ...
33
votes
4answers
12k views

What is a better way to deal with server disconnects of sshfs mounts?

I have several directories mounted through sshfs. I sometimes get disconnects from the server (not configurable by me). I usually mount the directories like this sshfs ...
73
votes
4answers
76k views

Why do I need a tty to run sudo if I can sudo without a password?

I have configured sudo to run without a password, but when I try to ssh 'sudo Foo", I still get sudo: sorry, you must have a tty to run sudo. Why does this happen and how can I work around it?
1
vote
0answers
11 views

How to enable unison to login with ssh from systemd service unit?

I have a pdf-sync.path file for systemd runnin in user-space (systemctl --user enable pdf-sync.path). Whenever there is a change in the folder that I defined in the path file I want to synchronize ...
0
votes
0answers
27 views

How do I send a variable through SSH so it can be used across servers? C Shell

EDIT: Would this be possible in bash? Note: I have to use C shell. (.csh) I have something very similar to the following code: set var = "string" ssh -X server "$var" << END * I ...
3
votes
3answers
380 views

SSH in SSH in shell script

I'm not sure I have the capability to test this right now, but was wondering if someone might advise if it is possible to do something like this: Run a shell script Shell Script SSH's into a ...