Re: cssh as non root - No protocol specified

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/27/2018 04:54 PM, bruce wrote:
> On Tue, Feb 27, 2018 at 4:40 PM, bruce <badouglas@xxxxxxxxx> wrote:
>> Hi.. again...
>>
>> ok..
>>
>> If I create /etc/clusters
>>
>> cat /etc/clusters
>> #clusters = testcluster
>>
>> testcluster1 -a "-t screen -r cSession" cuser@1.2.3.4
>>
>> cssh testcluster1 doesn't work... throws up a number of windows/terms
>> that immediately crash..
>>
>> However, running
>>    testcluster1 -a "-t screen -r cSession" cuser@1.2.3.4
>> from the cmdline does work...
>>
>> and it displays the term/window in the running screen session..
>>
>> So, got 2 questions/issues...
>>
>> 1- is there a way to get this to work in the config file??
>> 2- running from the cmdline works.. but when I do a " ctrlA-d to get
>> out of the screen session.. I also kill the term!
>>     Is there a way to be able to "launch the screen" but also be able
>> to kill the screen session, returning to the
>>     shell if the cssh/window...
>>     I could prob run some quick/dirty shell script to fire up the
>> screen session.. within the window when it gets launched..
>>      but that seems kludgy..
>>
>> thoughts/comments..
>>
>> thanks
>>
>>
>>
>>
>>
>> On Tue, Feb 27, 2018 at 2:44 PM, bruce <badouglas@xxxxxxxxx> wrote:
>>> Hi.
>>>
>>> Testing the cssh process.
>>>
>>> I configured the /etc/clusters file to have
>>> -testcluser foo@1.2.3.4
>>>
>>> As user 'foo' I run -- cssh testuser
>>>
>>> Process returns:
>>>    Connection to server failed -- (version 11.0)
>>>    No protocol specified
>>>    at /usr/bin/cssh line 2152
>>>
>>> As a test, logged in as root ran the same thing.. a term displayed.
>>>
>>> So, I've got something misconfigured on the local to run the gui process.
>>>
>>> In the /etc/ssh/ssh_config I tested with both
>>>   ForwardX11 yes/no <<<<
>>>
>>> with no difference
>>>
>>> Looking through the 'net I se a number of possible issues, but as I
>>> currently work through them, no change.
>>>
>>> Thoughts/comments??
>>>
>>> Thanks
> 
> 
> Followup...
> 
> Tried to see if it's possible to use cssh to "run" an initial cmd upon
> launch. Unable to get it to work.

Hmmm. Well, if the command you told the remote system to run simply does
something and exits, the cssh session won't hang around after the
command completes since it wasn't an interactive session.

> The following was used.
> 
> cssh  -debug 1 --title '11' -a '/home/crawl_user/cssh1.php' crawl_user@1,2,3,4
> 
> This is run on the local, to invoke  a term/window for the remote.
> 
> The test cssh1.php is a simple php using an input screenSession name
> to run/generate the screenSession on the remote.
> 
> #!/usr/bin/php
> <?php
> 
> /*
>  cssh1.php
> */
> 
> $t=$argv[1];
> //print $t."\n";
> $t="screen -r ".$t;
> `$t &`;
> 
> ?>
> 
> In running the cssh, I get ::
> Loading keymaps and keycodes
> Warning: Tried to connect to session manager, None of the
> authentication protocols specified are supported
> 159.203.188.67  session closed
> 
> where the term/window is displayed for a sec and then dies.
> 
> by the way, running
> 
>         cssh --title '252' -a "-t screen -r crawl2Session" crawl_user@1.2.3.4 &
> 
> works as expected with the term fired up and the screen session running.
> 
> Any thoughts on what's missing with the attempt as passing arg to the
> php to get it to run remotely?

Telling cssh to run something like "screen -r" at the remote end won't
work since having cssh pass a command to the remote end makes this a
non-interactive session. In fact, you should see some message like

	You must be connected to a terminal

in the remote end's cssh window while it's open. Thus, once cssh
connects to the remote end and gives it the "screen -r" command, the
session ends. The correct command for what you want to do is:

	cssh --title '252' -o '-t' -a 'screen -r crawl2Session' crawl_user@1.2.3.4

The trick is the "-o '-t'", telling _ssh_ to allocate a terminal (and
thus making it an interactive session). The cssh window will stay opened
to the screen session on the remote end. Hitting "CTRL-A d" in the
cssh window will detach from the screen session and cssh will close the
window once you've detached.

Remember, all cssh does is open windows and run ssh sessions to the
various remote hosts in those windows. You're still governed by ssh and
how it does things.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks@xxxxxxxxxxxxxx -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-      A day for firm decisions!!!   Well, then again, maybe not!    -
----------------------------------------------------------------------
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux