a script to extract cwcli out put from LMS 3.1

Unanswered Question
Jun 22nd, 2009

on my old LMS 2.6 using a command on my script to pull cwcli as follow" system('/usr/local/bin/ssh LMS-serv /opt/CSCOpx/campus/bin/ut -u XXX -p XXX -cli -query all -layout DEVICES > /tmp/ut-data'); this work because the server log on root privilage. now I don't have root privilege on New LMS server.so i couldn't log in with out providing the password. so how I can add password on ssh line " system('/usr/local/bin/ssh" I know add option (-l)for login but don't know what option use for password. because -p is not password instead of for port any help!!!!

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Joe Clarke Mon, 06/22/2009 - 10:58

This is not possible. You will have to enter the password manually. Note: you really don't want to the password on the command line as it would then be visible in the ps output. You should consider setting up public key authentication, and using an ssh-agent. Alternatively, you can use something like expect to wrap the call to ssh in order to respond to the Password: prompt.

Martin Ermel Tue, 06/23/2009 - 00:03

I do not know how you further process the received data you get from cwcli, but beside the public key authentication to authenticate you should also have a look if the servlet option could be a solution:


with this you do not have to login to the server but you are sending a request to the Web-Server and you will get back the result that could be written in a file. But the result will be in XML not csv.

eliaspaulos Tue, 06/23/2009 - 07:55

thank you so very much, my perl knowledge is very limited and I am very happy to try anything at this moment, do you think can convert xml to csv later? I am using this data for many things including for service desk I need badly.


This Discussion