What Does –– (double dash) Mean In SSH Shell Command?

Posted on in Categories , , , last updated December 3, 2013

I see lots of seasoned admins and cloud provider wrapper scripts use ssh client command as follows in shell:

ssh [email protected] --

What the double -- does here? Why it is used in this shell command and why not just use the following?

ssh [email protected]

SSH: Use Remote Bash / KSH source Command Set Variable Locally From a Remote Server

Posted on in Categories , , last updated December 4, 2012

I have setup a master / local server combination using OpenSSH. My local server depends upon master server for a remote sourcing. The remote sourcing should set a large number of variables locally in a bash shell script. The code is:

[email protected] $ source ssh [email protected] "/service/dyn.master.setenv.sh --mode=slave"
echo “$var”

The var is not setting and I am getting various errors. How can I do a remote “source” of a bash script file (from master.example.com) and set a shell variable locally at slave.example.com?