Topic "automate complex connection activity"

Author Message
ildar
[View user's profile]

Joined: 2015-12-29
Posts: 3
Hi all!
at connection I get error (log):
Code:

. 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?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
You can try to use Shell session option for this:
https://winscp.net/eng/docs/ui_login_scp
ildar
[View user's profile]

Joined: 2015-12-29
Posts: 3
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?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
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?
ildar
[View user's profile]

Joined: 2015-12-29
Posts: 3
It closed automatically after connection.
here log:
Code:

=~=~=~=~=~=~=~=~=~=~=~= 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

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
And for the same reason WinSCP does not work.

Quote:
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.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License