# plink syntax question?

**URL:** <https://community.f5.com/t/plink-syntax-question/28725>\
**Category:** Technical Forums\
**Tags:** design, config\
**Created:** [October 21, 2009, 7:17pm UTC](https://community.f5.com/t/plink-syntax-question/28725 "2009-10-21T19:17:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![khalid\_k\_50814](https://avatars.discourse-cdn.com/v4/letter/k/a6a055/32.png) [@khalid\_k\_50814](https://community.f5.com/u/khalid_k_50814)\
**Post date:** [October 21, 2009, 7:17pm UTC](https://community.f5.com/t/plink-syntax-question/28725/1 "2009-10-21T19:17:04Z")

</div>

Hello,

I am new to the F5/BIG-IP world and have been struggling with a problem for sometime. I am writing a script which needs to SSH from a WINDOWS machine and remotely send commands to the F5 server.

Below is my PLINK ([http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)) script (it’s just a 1 liner command in italics) and corresponding response:

D:\apps\extpip\>_plink -ssh [endecaF5@140.147.132.22](mailto:endecaF5@140.147.132.22) -pw blah “b node 192.168.192.131 session disable”_

BIGpipe parsing error:

012e0008:3: The requested command (b node 192.168.192.131 session disable) is invalid

When I manually SSH into the server and run the same command at the prompt “b node 192.168.192.131 session disable”, it executes without any errors.

Can anyone please shed some light on what’s going on here?

Thank you very much in advance,

---

<div class="post-metadata">

**Author:** ![hoolio](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@hoolio](https://community.f5.com/u/hoolio)\
**Post date:** [October 26, 2009, 1:38pm UTC](https://community.f5.com/t/plink-syntax-question/28725/2 "2009-10-26T13:38:28Z")

</div>

Hi,

I just tried using plink to disable sessions on a 10.0.1 and 9.4.6 LTM node and it worked fine. The GUI reflects the session being disabled/enabled. Which LTM version are you running? Can you run 'plink -ssh [endecaF5@140.147.132.22](mailto:endecaF5@140.147.132.22) -pw blah “b node list” successfully?

user@host /cygdrive/c/tools/putty

$ ./plink.exe -ssh user@ltm -pw password “b node list”

node 10.41.0.21 {}

node 10.41.1.100 {}

node 10.41.135.3 {}

node 1.2.145.79 {}

node 1.2.45.100 {}

user@host /cygdrive/c/tools/putty

$ ./plink.exe -ssh user@ltm -pw password “b node 10.41.1.100 list”

node 10.41.1.100 {}

user@host /cygdrive/c/tools/putty

$ ./plink.exe -ssh user@ltm -pw password “b node 10.41.1.100 list all”

node 10.41.1.100 {

limit 0

ratio 1

dynamic ratio 1

unchecked

session enable

monitor default

screen none

partition Common

}

user@host /cygdrive/c/tools/putty

$ ./plink.exe -ssh user@ltm -pw password “b node 10.41.1.100 session disable”

Aaron

---

<div class="post-metadata">

**Author:** ![khalid\_k\_50814](https://avatars.discourse-cdn.com/v4/letter/k/a6a055/32.png) [@khalid\_k\_50814](https://community.f5.com/u/khalid_k_50814)\
**Post date:** [October 26, 2009, 4:45pm UTC](https://community.f5.com/t/plink-syntax-question/28725/3 "2009-10-26T16:45:16Z")

</div>

Aaron,

Thanks for the reply.

When I run the command you suggested I get the following error:

C:\\>_plink -ssh [endecaF5@140.147.132.22](mailto:endecaF5@140.147.132.22) -pw blah “b node list”_

BIGpipe parsing error:

012e0008:3: The requested command (b node list) is invalid

C:\\>

Again, when I manually SSH into the F5 and run the “b node list” from the command line, it returns a list of nodes:

bp\>_b node list_

node 140.147.249.7 {

}

node 192.168.192.101 {

screen CRSAPPS20

}

node 192.168.192.102 {

screen CRSAPPS21

}

node 192.168.192.111 {

screen CRSAPPS24

}

node 192.168.192.112 {

screen CRSAPPS25

}

node 192.168.192.121 {

screen CRSAPPS26

}

node 192.168.192.122 {

screen CRSAPPS27

}

node 192.168.192.131 {

screen CRSAPPS18

}

Running version from the command line, it appears that our BIG-IP is version 9.4.7:

bp\>version

Kernel:

Linux 2.4.21-9.4.7.320.0smp

Package:

BIG-IP Version 9.4.7 320.1

Final Edition

Enabled Features:

… (too much to paste)

I also tried problematically SSH’ing and sending the same remote command through a Java API ([JSch - Java Secure Channel](http://www.jcraft.com/jsch/)), and am getting the same errors.

Any idea on how to proceed?

Thanks again in advance Aaron,

---

<div class="post-metadata">

**Author:** ![hoolio](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@hoolio](https://community.f5.com/u/hoolio)\
**Post date:** [October 26, 2009, 4:54pm UTC](https://community.f5.com/t/plink-syntax-question/28725/4 "2009-10-26T16:54:52Z")

</div>

Ah, it’s because your user’s shell is set to bigpipe not a full shell. If you change the user’s “terminal access” to Advanced Shell, it should work fine.

Aaron

---

<div class="post-metadata">

**Author:** ![khalid\_k\_50814](https://avatars.discourse-cdn.com/v4/letter/k/a6a055/32.png) [@khalid\_k\_50814](https://community.f5.com/u/khalid_k_50814)\
**Post date:** [October 26, 2009, 7:10pm UTC](https://community.f5.com/t/plink-syntax-question/28725/5 "2009-10-26T19:10:59Z")

</div>

Aaron,

Yep, that was the problem!

Thanks tremendously for your help!

Take care,

---

<div class="post-metadata">

**Author:** ![hoolio](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@hoolio](https://community.f5.com/u/hoolio)\
**Post date:** [October 27, 2009, 9:59am UTC](https://community.f5.com/t/plink-syntax-question/28725/6 "2009-10-27T09:59:52Z")

</div>

No problem. Glad it worked for you.

Aaron

---

<div class="post-metadata">

**Author:** ![Anish\_Makil](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@Anish\_Makil](https://community.f5.com/u/Anish_Makil)\
**Post date:** [May 28, 2010, 4:48pm UTC](https://community.f5.com/t/plink-syntax-question/28725/7 "2010-05-28T16:48:02Z")

</div>

First of all thanks for this post. i also was able to output the shell output to a .txt file. my question is is there a way to add some comments into the output txt file for example between the output add texts like "---------B interface ------- "

---

<div class="post-metadata">

**Author:** ![hoolio](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@hoolio](https://community.f5.com/u/hoolio)\
**Post date:** [May 28, 2010, 5:01pm UTC](https://community.f5.com/t/plink-syntax-question/28725/8 "2010-05-28T17:01:04Z")

</div>

Hi Anish,

You could try something like this:

plink -ssh [endecaF5@140.147.132.22](mailto:endecaF5@140.147.132.22) -pw blah “echo ‘---- b node list ----’; b node list; echo ‘---- b pool list ----’; b pool list;”

Aaron

---

<div class="post-metadata">

**Author:** ![Anish\_Makil](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@Anish\_Makil](https://community.f5.com/u/Anish_Makil)\
**Post date:** [May 28, 2010, 5:09pm UTC](https://community.f5.com/t/plink-syntax-question/28725/9 "2010-05-28T17:09:02Z")

</div>

thanks Much you re goodddddddddd, greatly appreciate the fast response
