Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Basic setting up session: Connection has been unexpectedly closed. Server sent command exit status 0

There's no "Connection has been unexpectedly closed. Server sent command exit status 0" in your log. The "Status code: 1" is not an error.
remkop

Basic setting up session: Connection has been unexpectedly closed. Server sent command exit status 0

Hi,

I used the example from this page: https://winscp.net/eng/docs/library_powershell#example and entered our details in it. But for some reason I cannot open the session with the given session-options.
This is what the log-file states:

. 2021-04-30 16:18:47.716 WinSCP Version 5.17.10 (Build 11087) (OS 10.0.18363 - Windows 10 Enterprise)
. 2021-04-30 16:18:47.718 Configuration: C:\TEMP\Scripts\WinSCP.ini
. 2021-04-30 16:18:47.719 Log level: Normal
. 2021-04-30 16:18:47.719 Local account: LLLLLLLLLLLLLLLLLLLL
. 2021-04-30 16:18:47.719 Working directory: C:\TEMP\Scripts
. 2021-04-30 16:18:47.719 Process ID: 19816
. 2021-04-30 16:18:47.721 Command-line: "C:\TEMP\Scripts\WinSCP.exe" LLLLLLLLLLLLLLLL
. 2021-04-30 16:18:47.721 Time zone: Current: GMT+2, Standard: GMT+1 (West-Europa (standaardtijd)), DST: GMT+2 (West-Europa (zomertijd)), DST Start: 28-3-2021, DST End: 31-10-2021
. 2021-04-30 16:18:47.721 Login time: vrijdag 30 april 2021 16:18:47
. 2021-04-30 16:18:47.721 --------------------------------------------------------------------------
. 2021-04-30 16:18:47.721 Session name: LLLLLLLLLLLLLLLLLLLLLLL (Ad-Hoc site)
. 2021-04-30 16:18:47.721 Host name: LLLLLLLLLLLLLLLLLLLLLLLLL
. 2021-04-30 16:18:47.721 User name: LLLLLLLLLL (Password: Yes, Key file: No, Passphrase: No)
. 2021-04-30 16:18:47.721 Tunnel: No
. 2021-04-30 16:18:47.721 Transfer Protocol: SFTP
. 2021-04-30 16:18:47.721 Ping type: Off, Ping interval: 30 sec; Timeout: 15 sec
. 2021-04-30 16:18:47.721 Disable Nagle: No
. 2021-04-30 16:18:47.721 Proxy: None
. 2021-04-30 16:18:47.722 Send buffer: 262144
. 2021-04-30 16:18:47.722 SSH protocol version: 2; Compression: No
. 2021-04-30 16:18:47.722 Bypass authentication: No
. 2021-04-30 16:18:47.722 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: Yes
. 2021-04-30 16:18:47.722 GSSAPI: Forwarding: No; Libs: gssapi32,sspi,custom; Custom:
. 2021-04-30 16:18:47.722 Ciphers: aes,chacha20,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2021-04-30 16:18:47.722 KEX: ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1
. 2021-04-30 16:18:47.722 SSH Bugs: Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto
. 2021-04-30 16:18:47.722 Simple channel: Yes
. 2021-04-30 16:18:47.722 Return code variable: Autodetect; Lookup user groups: Auto
. 2021-04-30 16:18:47.722 Shell: default
. 2021-04-30 16:18:47.722 EOL: LF, UTF: Auto
. 2021-04-30 16:18:47.722 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes; Follow directory symlinks: No
. 2021-04-30 16:18:47.722 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No; Exit code 1 is error: No
. 2021-04-30 16:18:47.722 SFTP Bugs: Auto,Auto
. 2021-04-30 16:18:47.722 SFTP Server: default
. 2021-04-30 16:18:47.722 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2021-04-30 16:18:47.722 Cache directory changes: Yes, Permanent: Yes
. 2021-04-30 16:18:47.723 Recycle bin: Delete to: No, Overwritten to: No, Bin path:
. 2021-04-30 16:18:47.723 DST mode: Unix
. 2021-04-30 16:18:47.723 --------------------------------------------------------------------------
. 2021-04-30 16:18:48.066 Looking up host "LLLLLLLLLLLLLLLLL" for SSH connection
. 2021-04-30 16:18:48.088 Connecting to LLLLLLLLLLLLLLLL port LLLLLLLLLLL
. 2021-04-30 16:18:48.146 We claim version: SSH-2.0-WinSCP_release_5.17.10
. 2021-04-30 16:18:48.146 Remote version: SSH-2.0-CrushFTPSSHD
. 2021-04-30 16:18:48.146 Using SSH protocol version 2
. 2021-04-30 16:18:48.158 Have a known host key of type rsa2
. 2021-04-30 16:18:48.169 Doing ECDH key exchange with curve Curve25519 and hash SHA-256
. 2021-04-30 16:18:48.424 Server also has ssh-dss host key, but we don't know it
. 2021-04-30 16:18:48.424 Host key fingerprint is:
. 2021-04-30 16:18:48.424 ssh-rsa 1024 41:bf:b5:ef:7e:8e:41:de:e5:4f:e9:df:38:79:45:f2 6bEeC3DnY328aNxynFV6QkRt/OANyWTXD8GZh8xhTUU=
. 2021-04-30 16:18:48.452 Host key matches cached key
. 2021-04-30 16:18:48.453 Initialised AES-256 SDCTR (AES-NI accelerated) outbound encryption
. 2021-04-30 16:18:48.453 Initialised HMAC-SHA-256 outbound MAC algorithm
. 2021-04-30 16:18:48.453 Initialised AES-256 SDCTR (AES-NI accelerated) inbound encryption
. 2021-04-30 16:18:48.453 Initialised HMAC-SHA-256 inbound MAC algorithm
! 2021-04-30 16:18:48.473 Using username "LLLLLLLLL".
. 2021-04-30 16:18:48.503 Server offered these authentication methods: password,publickey,keyboard-interactive
. 2021-04-30 16:18:48.503 Attempting keyboard-interactive authentication
. 2021-04-30 16:18:48.520 Prompt (keyboard interactive, "SSH server: password", "Enter password for LLLLLLLLLLL", "Password:")
. 2021-04-30 16:18:48.520 Using stored password.
. 2021-04-30 16:18:48.627 Access granted
. 2021-04-30 16:18:48.627 Opening main session channel
. 2021-04-30 16:18:48.654 Opened main channel
. 2021-04-30 16:18:48.674 Started a shell/command
. 2021-04-30 16:18:48.713 --------------------------------------------------------------------------
. 2021-04-30 16:18:48.713 Using SFTP protocol.
. 2021-04-30 16:18:48.716 Doing startup conversation with host.
> 2021-04-30 16:18:48.729 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2021-04-30 16:18:48.747 Type: SSH_FXP_VERSION, Size: 95, Number: -1
. 2021-04-30 16:18:48.747 SFTP version 4 negotiated.
. 2021-04-30 16:18:48.747 Server requests EOL sequence "\r\n".
. 2021-04-30 16:18:48.747 Server software: Maverick SSHD 1.7.31 (0) by JADAPTIVE Limited
. 2021-04-30 16:18:48.747 We will use UTF-8 strings as it is mandatory with SFTP version 4 and newer
. 2021-04-30 16:18:48.747 Getting current directory name.
. 2021-04-30 16:18:48.747 Getting real path for '.'
> 2021-04-30 16:18:48.747 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2021-04-30 16:18:48.766 Type: SSH_FXP_NAME, Size: 47, Number: 16
. 2021-04-30 16:18:48.766 Real path is '/'
. 2021-04-30 16:18:48.831 Listing directory "/".
> 2021-04-30 16:18:48.831 Type: SSH_FXP_OPENDIR, Size: 10, Number: 267
< 2021-04-30 16:18:48.851 Type: SSH_FXP_HANDLE, Size: 18, Number: 267
> 2021-04-30 16:18:48.852 Type: SSH_FXP_READDIR, Size: 18, Number: 524
< 2021-04-30 16:18:48.872 Type: SSH_FXP_NAME, Size: 127, Number: 524
> 2021-04-30 16:18:48.873 Type: SSH_FXP_READDIR, Size: 18, Number: 780
< 2021-04-30 16:18:48.896 Type: SSH_FXP_STATUS, Size: 40, Number: 780
< 2021-04-30 16:18:48.896 Status code: 1
> 2021-04-30 16:18:48.896 Type: SSH_FXP_CLOSE, Size: 18, Number: 1028
. 2021-04-30 16:18:48.896 ..;D;0;2021-04-30T14:18:14.000Z;3;"" [0];"" [0];rwxrwxrwx;1
. 2021-04-30 16:18:48.896 test;D;0;2021-04-30T09:25:20.000Z;3;"" [0];"" [0];rwxrwxrwx;1
. 2021-04-30 16:18:48.945 Startup conversation with host finished.