automate complex connection activity

Advertisement

ildar
Joined:
Posts:
3

automate complex connection activity

Hi all!
at connection I get error (log):
. 2015-12-29 12:52:42.775 Sent password
. 2015-12-29 12:52:42.946 Access granted
. 2015-12-29 12:52:43.026 Opened channel for session
. 2015-12-29 12:52:43.106 Started a shell/command
. 2015-12-29 12:52:43.106 --------------------------------------------------------------------------
. 2015-12-29 12:52:43.106 Using SCP protocol.
. 2015-12-29 12:52:43.116 Doing startup conversation with host.
. 2015-12-29 12:52:43.116 Skipping host startup message (if any).
> 2015-12-29 12:52:43.116 echo "WinSCP: this is end-of-file:0"
! 2015-12-29 12:52:43.196 Traceback (most recent call last):
...
..(I cut it for security reason)...
...
. 2015-12-29 12:52:43.276 Server sent command exit status 1
. 2015-12-29 12:52:43.276 Disconnected: All channels closed
* 2015-12-29 12:52:43.286 (ESshFatal) Connection has been unexpectedly closed. Server sent command exit status 1.
* 2015-12-29 12:52:43.286 Error skipping startup message. Your shell is probably incompatible with the application (BASH is recommended).
It is because shell is not bash - it is custom server script, that requires 3 times to press enter, and only after this it starts bash.

Is any ability to automate this moment: do not send "WinSCP: this is end-of-file:0", but send "WinSCP: this is enter:13" three times?

Reply with quote

Advertisement

ildar
Joined:
Posts:
3

Re: automate complex connection activity

there is no ability to send chr(13) three times there, isn't it?

But what about changing source code specially for this task?
I red about compiling, and there are so many requirements - install one, then second, and so on.

I am pl/sql developer. I think that I can understand and change C code.

May be, you have preconfigured virtual machine for compiling WinSCP source code?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,453
Location:
Prague, Czechia

Re: automate complex connection activity

No we do not have VM for this.

Anyway, from the log, I do not even think the server is waiting for the Enter.

Try to login using PuTTY with "Don't allocate a pseudo-terminal" option tuned on. What would it do?

Reply with quote

ildar
Joined:
Posts:
3

It closed automatically after connection.
here log:
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2016.01.15 10:51:33 =~=~=~=~=~=~=~=~=~=~=~=
login as: 60028372
pass@server.com's password: 
Traceback (most recent call last):
  File "/usr/bin/menu-vaubbban.py", line 132, in <module>
    main()
  File "/usr/bin/menu-vaubbban.py", line 126, in main
    vaubbban_main.vaubbban_menu()
  File "/usr/lib64/python2.6/site-packages/vaubbban/vaubbban.py", line 427, in vaubbban_menu
    self.show_warning()
  File "/usr/lib64/python2.6/site-packages/vaubbban/vaubbban.py", line 193, in show_warning
    menu = vaubbban_menu.vaubbban_menu(self.options)
  File "/usr/lib64/python2.6/site-packages/vaubbban/vaubbban_menu.py", line 31, in __init__
    self.scr = curses.initscr()
  File "/usr/lib64/python2.6/curses/__init__.py", line 33, in initscr
    fd=_sys.__stdout__.fileno())
_curses.error: setupterm: could not find terminal
Exception _curses.error: 'must call initscr() first' in <bound method vaubbban_menu.__del__ of <vaubbban.vaubbban_menu.vaubbban_menu instance at 0x25e5a70>> ignored

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,453
Location:
Prague, Czechia

And for the same reason WinSCP does not work.

setupterm: could not find terminal
There's something on the remote side (typically some command executed from some startup script) that requires an interactive terminal. Most probably it's actually the "GUI" the "requires 3 times to press enter". It's not compatible with the non-interactive terminal used by WinSCP.

Reply with quote

Advertisement

You can post new topics in this forum