<div dir="ltr">Hi,<div><br></div><div>command prompt is start of the line after you login to a machine via ssh. On my machine it is:</div><div><br></div><div>login@hostname:~$</div><div><br></div><div>because command prompt depends on shell, settings, ...we are starting ssh to run shell with predefined command prompt: [EXPECT]$. What does not work on your system</div><div><br></div><div>m,</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 26, 2017 at 6:09 PM, <span dir="ltr"><<a href="mailto:durwin@mgtsciences.com" target="_blank">durwin@mgtsciences.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><tt><font size="2">Marek Grac <<a href="mailto:mgrac@redhat.com" target="_blank">mgrac@redhat.com</a>> wrote on 01/26/2017
09:19:41 AM:<br>
<br>
> From: Marek Grac <<a href="mailto:mgrac@redhat.com" target="_blank">mgrac@redhat.com</a>></font></tt>
<br><tt><font size="2">> To: Cluster Labs - All topics related to open-source
clustering <br>
> welcomed <<a href="mailto:users@clusterlabs.org" target="_blank">users@clusterlabs.org</a>></font></tt>
<br><tt><font size="2">> Date: 01/26/2017 09:20 AM</font></tt>
<br><tt><font size="2">> Subject: Re: [ClusterLabs] Can fence_vbox ssh-options
be configured <br>
> to use Windows DOS shell?</font></tt>
<br><span class=""><tt><font size="2">> <br>
> Hi,</font></tt>
<br><tt><font size="2">> <br>
> On Thu, Jan 26, 2017 at 5:06 PM, <<a href="mailto:durwin@mgtsciences.com" target="_blank">durwin@mgtsciences.com</a>> wrote:</font></tt>
<br><tt><font size="2">> I have Windows 10 running Virtualbox with 2 VMs
running Fedora 25. <br>
> I have followed 'Pacemaker 1.1 Clusters from Scratch' 9th edition
up<br>
> through chapter 7. It works. I am now trying to fence
VMs. I use <br>
> Cygwin ssh daemon and of course bash is default for the options. <br>
> <br>
> I have used command below from one of the nodes and get the following
return.<br>
> <br>
> fence_vbox -vv --ip=172.23.93.249 --username=durwin --identity-<br>
> file=/root/.ssh/id_rsa.pub --password= --plug="node1" --action=off
</font></tt>
<br><tt><font size="2">> <br>
> add --verbose please.</font></tt>
<br><tt><font size="2">> <br>
> but it looks, you will have to change --ssh-options so it does not
<br>
> execute /bin/bash; it should be be enough to set it to "".
You will <br>
> also have to set --command-prompt to an appropriate value then. </font></tt>
<br><tt><font size="2">> <br>
> m,</font></tt>
<br><tt><font size="2">> </font></tt>
<br>
<br></span><tt><font size="2">Thank you. Verbose is set '-vv'.</font></tt>
<br>
<br><tt><font size="2">I added --ssh-options="" to the command,
see below. I do not know how to find out what value command-prompt
needs. What do I look for?</font></tt>
<br>
<br><tt><font size="2">fc25> fence_vbox --verbose --ip=172.23.93.249 --username=durwin
--identity-file=/root/.ssh/id_<wbr>rsa.pub --password= --plug="node1"
--action=off --ssh-options=""</font></tt>
<br><span class=""><tt><font size="2">Delay 0 second(s) before logging in to the fence device</font></tt>
<br><tt><font size="2">Running command: /usr/bin/ssh <a href="mailto:durwin@172.23.93.249" target="_blank">durwin@172.23.93.249</a>
-i /root/.ssh/id_rsa.pub -p 22</font></tt>
<br></span><tt><font size="2">Timeout exceeded.</font></tt>
<br><tt><font size="2"><fencing.fspawn object at 0x7ff4d38e6d50></font></tt>
<br><tt><font size="2">command: /usr/bin/ssh</font></tt>
<br><tt><font size="2">args: ['/usr/bin/ssh', '<a href="mailto:durwin@172.23.93.249" target="_blank">durwin@172.23.93.249</a>', '-i',
'/root/.ssh/id_rsa.pub', '-p', '22']</font></tt>
<br><tt><font size="2">buffer (last 100 chars): "<a href="mailto:durwin@172.23.93.249" target="_blank">durwin@172.23.93.249</a>'s
password: "</font></tt>
<br><tt><font size="2">before (last 100 chars): "<a href="mailto:durwin@172.23.93.249" target="_blank">durwin@172.23.93.249</a>'s
password: "</font></tt>
<br><tt><font size="2">after: <class 'pexpect.exceptions.TIMEOUT'></font></tt>
<br><tt><font size="2">match: None</font></tt>
<br><tt><font size="2">match_index: None</font></tt>
<br><tt><font size="2">exitstatus: None</font></tt>
<br><tt><font size="2">flag_eof: False</font></tt>
<br><tt><font size="2">pid: 17014</font></tt>
<br><tt><font size="2">child_fd: 6</font></tt>
<br><tt><font size="2">closed: False</font></tt>
<br><tt><font size="2">timeout: 30</font></tt>
<br><tt><font size="2">delimiter: <class 'pexpect.exceptions.EOF'></font></tt>
<br><tt><font size="2">logfile: None</font></tt>
<br><tt><font size="2">logfile_read: None</font></tt>
<br><tt><font size="2">logfile_send: None</font></tt>
<br><tt><font size="2">maxread: 2000</font></tt>
<br><tt><font size="2">ignorecase: False</font></tt>
<br><tt><font size="2">searchwindowsize: None</font></tt>
<br><tt><font size="2">delaybeforesend: 0.05</font></tt>
<br><tt><font size="2">delayafterclose: 0.1</font></tt>
<br><tt><font size="2">delayafterterminate: 0.1</font></tt>
<br><tt><font size="2">searcher: searcher_re:</font></tt>
<br><tt><font size="2"> 0: re.compile("Enter passphrase
for key '/root/.ssh/id_rsa.pub':")</font></tt>
<br><tt><font size="2"> 1: re.compile("Are you sure you
want to continue connecting (yes/no)?")</font></tt>
<br><tt><font size="2"> 2: re.compile("\[EXPECT\]#\ ")</font></tt>
<br><tt><font size="2">Unable to connect/login to fencing device</font></tt>
<br><div class="HOEnZb"><div class="h5">
<br>
<br><tt><font size="2">> Delay 0 second(s) before logging in to the fence
device <br>
> Running command: /usr/bin/ssh <a href="mailto:durwin@172.23.93.249" target="_blank">durwin@172.23.93.249</a> -i /root/.ssh/<br>
> id_rsa.pub -p 22 -t '/bin/bash -c "PS1=\\[EXPECT\\]#\ /bin/bash
--<br>
> noprofile --norc"' <br>
> Received: Enter passphrase for key '/root/.ssh/id_rsa.pub': <br>
> Sent: <br>
> <br>
> Received: <br>
> [EXPECT]# <br>
> Sent: VBoxManage list runningvms <br>
> <br>
> Connection timed out <br>
> <br>
> I tried the following commands from a DOS shell on the Windows host
<br>
> and commands successfully executed (from Cygwin terminal it fails).
<br>
> <br>
> VBoxManage controlvm node1 acpipowerbutton <br>
> VBoxManage startvm node1 --type=gui <br>
> <br>
> I am aware that some Windows executables do not communicate with <br>
> Cygwin terminals. Is there a way to pass ssh options so that
<br>
> VBoxManage is executed from DOS shell? <br>
> <br>
> Thank you, <br>
> <br>
> Durwin<br>
> <br>
> <br>
> This email message and any attachments are for the sole use of the
<br>
> intended recipient(s) and may contain proprietary and/or <br>
> confidential information which may be privileged or otherwise <br>
> protected from disclosure. Any unauthorized review, use, disclosure
<br>
> or distribution is prohibited. If you are not the intended recipient<br>
> (s), please contact the sender by reply email and destroy the <br>
> original message and any copies of the message as well as any <br>
> attachments to the original message.<br>
> ______________________________<wbr>_________________<br>
> Users mailing list: <a href="mailto:Users@clusterlabs.org" target="_blank">Users@clusterlabs.org</a><br>
> </font></tt><a href="http://lists.clusterlabs.org/mailman/listinfo/users" target="_blank"><tt><font size="2">http://lists.clusterlabs.org/<wbr>mailman/listinfo/users</font></tt></a><tt><font size="2"><br>
> <br>
> Project Home: </font></tt><a href="http://www.clusterlabs.org/" target="_blank"><tt><font size="2">http://www.clusterlabs.org</font></tt></a><tt><font size="2"><br>
> Getting started: </font></tt><a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank"><tt><font size="2">http://www.clusterlabs.org/<wbr>doc/Cluster_from_Scratch.pdf</font></tt></a><tt><font size="2"><br>
> Bugs: </font></tt><a href="http://bugs.clusterlabs.org/" target="_blank"><tt><font size="2">http://bugs.clusterlabs.org</font></tt></a><tt><font size="2"><br>
</font></tt>
<br><tt><font size="2">> ______________________________<wbr>_________________<br>
> Users mailing list: <a href="mailto:Users@clusterlabs.org" target="_blank">Users@clusterlabs.org</a><br>
> </font></tt><a href="http://lists.clusterlabs.org/mailman/listinfo/users" target="_blank"><tt><font size="2">http://lists.clusterlabs.org/<wbr>mailman/listinfo/users</font></tt></a><tt><font size="2"><br>
> <br>
> Project Home: </font></tt><a href="http://www.clusterlabs.org/" target="_blank"><tt><font size="2">http://www.clusterlabs.org</font></tt></a><tt><font size="2"><br>
> Getting started: </font></tt><a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank"><tt><font size="2">http://www.clusterlabs.org/<wbr>doc/Cluster_from_Scratch.pdf</font></tt></a><tt><font size="2"><br>
> Bugs: </font></tt><a href="http://bugs.clusterlabs.org/" target="_blank"><tt><font size="2">http://bugs.clusterlabs.org</font></tt></a><tt><font size="2"><br>
</font></tt><font size="2" face="sans-serif"><br>
<br>
<br>
This email message and any attachments are for the sole use of the intended
recipient(s) and may contain proprietary and/or confidential information
which may be privileged or otherwise protected from disclosure. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not the
intended recipient(s), please contact the sender by reply email and destroy
the original message and any copies of the message as well as any attachments
to the original message.</font></div></div><br>______________________________<wbr>_________________<br>
Users mailing list: <a href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><br>
<a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/<wbr>mailman/listinfo/users</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/<wbr>doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
<br></blockquote></div><br></div>