deesnow / ossi_tool

ISC License
4 stars 8 forks source link

Login failed #4

Closed fiodorpugach closed 4 years ago

fiodorpugach commented 4 years ago

I tried all versions, but 'Login failed' every time. These are 'Cygwin64 Terminal' content when I try using ossi-tool 0.3.3.1 and debug.log: Cygwin64 Terminal.txt debug.log I can login with the same IP address and username/password using SSH in Cygwin64 Terminal.

I really need ossi-tool, so any help will be appreciated. Thank you!

deesnow commented 4 years ago

Do NOT use space between -p and the password.

Usage example:

ossi_tool 192.168.10.10 sampleuser -ppassword -i commands.csv -o outputfile.csv

fiodorpugach commented 4 years ago

Thank you for prompt response! I just tried - the same thing: $ ossi_tool 129.83.44.251 ossitool -pOssiTool -i Input.csv -o Output.scv -v --- Let Start! --- Login failed

P Traceback (most recent call last): File "/usr/bin/ossi_tool", line 8, in sys.exit(main()) File "/usr/lib/python2.7/site-packages/ossi_tool/ossit.py", line 344, in main a.ossi_close().44.251 ossitool -pOssiTool -i Input.csv -o Output.scv -v File "/usr/lib/python2.7/site-packages/ossi_tool/ossit.py", line 116, in ossi_close self.s.sendline('clogoff') File "/usr/lib/python2.7/site-packages/pexpect/pty_spawn.py", line 578, in sendline return self.send(s + self.linesep) File "/usr/lib/python2.7/site-packages/pexpect/pty_spawn.py", line 569, in send return os.write(self.child_fd, b) OSError: [Errno 9] Bad file descriptor

deesnow commented 4 years ago

It could be some kind of Cygwin related issue. When I stated this project and Linux Subsystem was not available on windows I used cywin as well, but it was a nightmare. What kind on Windows do you use? Do you have change to use WLS (Windows Linux Subsystem). It work much better that cygwin.

Could you check the pexpect version with 'pip show pexpect' ?

fiodorpugach commented 4 years ago

I use WIN10-1709.

$ pip show pexpect DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support Name: pexpect Version: 4.8.0 Summary: Pexpect allows easy control of interactive console applications. Home-page: https://pexpect.readthedocs.io/ Author: Noah Spurrier; Thomas Kluyver; Jeff Quast Author-email: noah@noah.org, thomas@kluyver.me.uk, contact@jeffquast.com License: ISC license Location: /usr/lib/python2.7/site-packages Requires: ptyprocess Required-by: ossi-tool

deesnow commented 4 years ago

Do you have python installed in cygwin or used the windows version ? This should be the case: https://stackoverflow.com/questions/37898514/cannot-use-pexpect-of-python-in-cygwin Not 100% sure but I met something similar. From pure Linux or WLS there is no login issue.

fiodorpugach commented 4 years ago

If WLS - which exact distribution you use for ossi-tool? There are 12 choices in MS store. I installed python and pip as the chosen options with the cygwin installation.

deesnow commented 4 years ago

Currently I'm using Ubuntu 18.04 LTS

fiodorpugach commented 4 years ago

OK, I will try removing CygWin and installing Ubuntu instead. I will post the result. Thank you for your prompt responses!

fiodorpugach commented 4 years ago

It works on WLS-Ubuntu! Thank you! I was able to run commands. with option -c. But with option -i it gives error ('Failed to open: ', 'Input.csv'). I'm probably using the wrong csv file format. What is the correct one? I tried to put cm command in txt file and rename it to csv.

fiodorpugach commented 4 years ago

Also is the any possibility to add multiple entries to 'change aar analysys' or remove multiple stations at once? Thank you!

deesnow commented 4 years ago

Great news... so I will close this issue.

Drop me an e-mail to janos.tarjanyi@gmail.com for other question which is not login issue related.

deesnow commented 4 years ago

Also is the any possibility to add multiple entries to 'change aar analysys' or remove multiple stations at once? Thank you!

change commands are complex because have to know all fields_ID, so it is not implemeted (yet).

deesnow commented 4 years ago

Login issue is caused by Cygwin. there is not problem on native Linux or on WLS.