Stuck at "Starting the session". Please help

Advertisement

yellow1912
Guest

Stuck at "Starting the session". Please help

I can use PuTTY just fine, but when I try to use WinSCP to connect to my server, the program stops at "Starting the session" and just hangs there forever. I tried to login other servers just fine.

Any suggestion is really appreciated since I'm a Linux newbie.

Reply with quote

Advertisement

yellow1912
Guest

Here goes, I removed several personal info and replaced by ******
. 2008-01-23 09:40:16.609 --------------------------------------------------------------------------
. 2008-01-23 09:40:16.625 WinSCP Version 4.0.6 (Build 358) (OS 5.1.2600 Service Pack 2)
. 2008-01-23 09:40:16.625 Login time: Wednesday, January 23, 2008 9:40:16 AM
. 2008-01-23 09:40:16.625 --------------------------------------------------------------------------
. 2008-01-23 09:40:16.625 Session name: ********
. 2008-01-23 09:40:16.625 Host name: *********.linode.com (Port: 22)
. 2008-01-23 09:40:16.625 User name: *********** (Password: Yes, Key file: Yes)
. 2008-01-23 09:40:16.625 Tunnel: No
. 2008-01-23 09:40:16.625 Transfer Protocol: SCP
. 2008-01-23 09:40:16.625 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2008-01-23 09:40:16.625 Proxy: none
. 2008-01-23 09:40:16.625 SSH protocol version: 2; Compression: No
. 2008-01-23 09:40:16.625 Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2008-01-23 09:40:16.625 Ciphers: aes,blowfish,3des,WARN,des; Ssh2DES: No
. 2008-01-23 09:40:16.625 SSH Bugs: -,-,-,-,-,-,-,-
. 2008-01-23 09:40:16.625 SFTP Bugs: -,-,-
. 2008-01-23 09:40:16.625 Return code variable: Autodetect; Lookup user groups: Yes
. 2008-01-23 09:40:16.625 Shell: default, EOL: 0
. 2008-01-23 09:40:16.625 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2008-01-23 09:40:16.625 Alias LS: No, Ign LS warn: Yes, Scp1 Comp: No
. 2008-01-23 09:40:16.625 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2008-01-23 09:40:16.625 Cache directory changes: Yes, Permanent: Yes
. 2008-01-23 09:40:16.625 DST mode: 1
. 2008-01-23 09:40:16.625 --------------------------------------------------------------------------
. 2008-01-23 09:40:16.796 Looking up host "********.linode.com"
. 2008-01-23 09:40:16.921 Connecting to ********* port 22
. 2008-01-23 09:40:17.031 Server version: SSH-2.0-OpenSSH_4.2p1 Debian-7ubuntu3.1
. 2008-01-23 09:40:17.031 We claim version: SSH-2.0-WinSCP_release_4.0.6
. 2008-01-23 09:40:17.031 Using SSH protocol version 2
. 2008-01-23 09:40:17.046 Doing Diffie-Hellman group exchange
. 2008-01-23 09:40:17.109 Doing Diffie-Hellman key exchange
. 2008-01-23 09:40:17.484 Host key fingerprint is:
. 2008-01-23 09:40:17.484 ssh-rsa 2048 34:fd:5b:52:56:23:c3:e2:6d:be:2d:aa:d9:db:23:5d
. 2008-01-23 09:40:17.484 Initialised AES-256 client->server encryption
. 2008-01-23 09:40:17.484 Initialised HMAC-SHA1 client->server MAC algorithm
. 2008-01-23 09:40:17.484 Initialised AES-256 server->client encryption
. 2008-01-23 09:40:17.484 Initialised HMAC-SHA1 server->client MAC algorithm
! 2008-01-23 09:40:17.546 Using username "*******".
. 2008-01-23 09:40:17.546 Reading private key file "C:\Programming\rubik.ppk"
. 2008-01-23 09:40:17.828 Offered public key
. 2008-01-23 09:40:17.875 Offer of public key accepted
! 2008-01-23 09:40:17.875 Authenticating with public key "rsa-key-20080122"
. 2008-01-23 09:40:17.875 Passphrase prompt (Passphrase for key "rsa-key-20080122": )
. 2008-01-23 09:40:29.718 Access granted
. 2008-01-23 09:40:29.781 Opened channel for session
. 2008-01-23 09:40:29.796 Started a shell/command
. 2008-01-23 09:40:29.796 --------------------------------------------------------------------------
. 2008-01-23 09:40:29.796 Using SCP protocol.
. 2008-01-23 09:40:29.828 Doing startup conversation with host.
. 2008-01-23 09:40:29.828 Skipping host startup message (if any).
> 2008-01-23 09:40:29.828 echo "WinSCP: this is end-of-file:0"
< 2008-01-23 09:40:29.953 [leohart@host115 lish] Wed Jan 23 10:40:28 EST 2008
< 2008-01-23 09:40:29.953 [leohart@host115 lish] Linode Shell (lish) Console starting...
! 2008-01-23 09:40:30.156 /bin/stty: standard input: Invalid argument
< 2008-01-23 09:40:30.156 [********@******* lish] Must be connected to a terminal.
 
< 2008-01-23 09:40:30.156 Your Linode isn't running, or another console session is already active.
! 2008-01-23 09:40:35.000 /bin/stty: standard input: Invalid argument
! 2008-01-23 09:40:35.187 /bin/stty: standard input: Invalid argument
! 2008-01-23 09:40:40.203 /bin/stty: standard input: Invalid argument
! 2008-01-23 09:40:40.203 /bin/stty: standard input: Invalid argument
! 2008-01-23 09:40:45.140 /bin/stty: standard input: Invalid argument
! 2008-01-23 09:40:45.140 /bin/stty: standard input: Invalid argument
! 2008-01-23 09:40:50.171 /bin/stty: standard input: Invalid argument
! 2008-01-23 09:40:50.171 /bin/stty: standard input: Invalid argument

Reply with quote

Ctec
Guest

WinSCP hangs while starting a session

How did you resolve it? Can you let us know the solution? I'm having the same problem.

Here is the log:
. 2010-12-06 13:43:01.847 --------------------------------------------------------------------------
. 2010-12-06 13:43:01.847 WinSCP Version 4.1.9 (Build 416) (OS 6.0.6002 Service Pack 2)
. 2010-12-06 13:43:01.847 Login time: Monday, December 06, 2010 1:43:01 PM
. 2010-12-06 13:43:01.847 --------------------------------------------------------------------------
. 2010-12-06 13:43:01.847 Session name: ctecBICSconn
. 2010-12-06 13:43:01.847 Host name: xxx.xxx.xx.xx(Port: 22)
. 2010-12-06 13:43:01.847 User name: xxxxx (Password: Yes, Key file: No)
. 2010-12-06 13:43:01.847 Tunnel: No
. 2010-12-06 13:43:01.847 Transfer Protocol: SFTP (SCP)
. 2010-12-06 13:43:01.847 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2010-12-06 13:43:01.847 Proxy: none
. 2010-12-06 13:43:01.847 SSH protocol version: 2; Compression: No
. 2010-12-06 13:43:01.847 Bypass authentication: No
. 2010-12-06 13:43:01.847 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2010-12-06 13:43:01.847 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2010-12-06 13:43:01.847 SSH Bugs: -,-,-,-,-,-,-,-
. 2010-12-06 13:43:01.847 SFTP Bugs: -,-
. 2010-12-06 13:43:01.847 Return code variable: Autodetect; Lookup user groups: Yes
. 2010-12-06 13:43:01.847 Shell: default, EOL: 0
. 2010-12-06 13:43:01.847 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2010-12-06 13:43:01.847 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2010-12-06 13:43:01.847 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2010-12-06 13:43:01.848 Cache directory changes: Yes, Permanent: Yes
. 2010-12-06 13:43:01.848 DST mode: 1
. 2010-12-06 13:43:01.848 --------------------------------------------------------------------------
. 2010-12-06 13:43:01.848 Looking up host ctecBICSconn

Reply with quote

Advertisement

Guest

Re: What was the solution???

In WinSCP change the Shell in Advanced options to shell (type in). This fixed my issue connecting to Citrix NetScaler.

Reply with quote

AdrianW
Guest

Re: WINSCP hangs while starting a session

The cause of the problem might that the remote directory does not exist anymore AND you have set
Advanced -> Environment -> SCP/Shell -> Shell: "Default"

The failure to set the current directory seems to break the shell auto-detection. So if you set an explicit shell, the problem goes away.

Other solutions:
  • choose an existing directory (Advanced -> Environment -> Directories -> Remote Directory:)
  • re-create the directory in a separate SSH session.

Reply with quote

Advertisement

MorgueFLB
Joined:
Posts:
4
Location:
Cape Town

Re: WINSCP hangs while starting a session

@AdrianW: THANK YOU.

This is exactly what the issue was in my situation. Changing the SCP/Shell from "Default" stopped my WinSCP from hanging when logging in.

However, changing it to any of the other 3 available options (/bin/bash or /bin/ksh or sudo su -) causes my WinSCP to report Authentication Failure when attempting to log in.

Of course, my authentication details are correct – I have verified them and can log in via PuTTY using those credentials with no problems.

Can I please ask, what other options I can use to specify a different Shell? Or "set an explicit shell" as recommended by @AdrianW above. I have no idea what to select or what to put here.

Reply with quote

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

Re: WINSCP hangs while starting a session

@MorgueFLB: Please, start a new thread and post a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

MorgueFLB
Joined:
Posts:
4
Location:
Cape Town

Hi there Martin

Thanks for your response and your interest in helping me resolve this problem!

I would like to do as you have requested, but before doing so, I would like to motivate why continued discussion in this thread is justified:

The topic of this thread is *Stuck at "Starting the session". Please help*. Until a complete resolution to the issue is found (the issue being that WinSCP isn't logging in), creating a new thread only serves to confuse users of WinSCP that come here looking for a solution to their problem.

A guest user above suggested "in WinSCP change the shell in advanced options to shell (type in)." And @AdrianW above said:
The cause of the problem might that the remote directory does not exist anymore AND you have set
Advanced -> Environment -> SCP/Shell -> Shell: "Default"

The failure to set the current directory seems to break the shell auto-detection. So if you set an explicit shell, the problem goes away.

Other solutions:
– choose an existing directory (Advanced -> Environment -> Directories -> Remote Directory:)
– re-create the directory in a separate SSH session
I believe that he is correct. I think the remote directory no longer exists. So I have specified a directory that I know exists in the Remote Directory setting.

But I do not know how to 'set an explicit shell' or to do as the Guest user suggested (change the shell in advanced options to shell (type in))

Changing the SCP/Shell setting from "Default" has only partially solved the problem.

Let me describe the issue in more detail:

I logged into the same server regularly, then suddenly one day WinSCP would just sit at "Starting the session" and never get any further – I left it for hours to check. And I did so on multiple occasions, just to make sure that it wasn't due to some sort of temporary or intermittent communication failure somewhere on the internet.

Note that at this point, if the user chooses to cancel the login process (by clicking on the [X] in the WinSCP login dialog), the status changes to "Cancelling..." and remains in that state for several minutes before WinSCP actually cancels it's attempt. During this time, the user can no longer interact with WinSCP in any way. WinSCP cannot be closed gracefully, and has to be manually terminated.

Searching the internet, and even the WinSCP site here, produced no clues as to what might be happening. The log file, while comprehensive, is utterly useless to anyone who isn't a WinSCP expert. I have been searching for a solution to this problem for a long time.

Note: I have attached the log file to this reply, selecting the Private file option. Inside the log file, I have also changed server names and addresses and usernames and passwords.

Yesterday, I found this post from @AdrianW that recommends changing the Shell/SCP option from "Default". I tried this, and suddenly WinSCP no longer hangs at "Starting the session" Fantastic!

However, the WinSCP still does not complete the login process – it *now* reports "Authentication failed" when it attempting to log in.

Note that at this point, WinSCP's login attempt can be cancelled, and it will properly go back to the initial dialog that allows you to choose your connection.

Regarding the authentication failure - this cannot be correct, because the credentials have not changed, and I have verified that they work by logging in successfully using PuTTy.

To me, it seems that the Shell/SCP option that is being chosen is incompatible with the combination of credentials and login method - and so WinSCP is reporting "Authentication failed".

My question, and possibly the resolution to the entire issue is: if Default cannot be chosen (because it causes WinSCP to hang) and the other 3 options cannot be chosen (because they cause WinSCP to incorrectly report authentication failure) then what other option can be supplied or inserted into the Shell/SCP box?

Note: this happens with at least the two previous versions of WinSCP, and also the very latest version (v5.11.3), which I installed today.

As you can see from the above Martin, the information is related, and therefore I don't think it should be split into a new thread.

Perhaps for you, dealing with a new thread is cleaner and easier. But for users of WinSCP who come here looking for a solution, it can be very frustrating to get half an answer, only to find that they have to look for another thread 'somewhere' that might have the rest of the answer.

However, if you insist on a new thread being created, I can do so.

Thank you.
  • WinSCP Logs for Martin.txt (19.03 KB, Private file)
Description: I have included pastebin links in the file if you want

Reply with quote

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

WinSCP needs a bash-line shell for SCP protocol.
Your default shell is Windows cmd.exe.
Do you have reason to believe that your server does support any bash-like shell?
I've never seen "SSH-2.0-MS_1.100" server before.
Are you sure you were ever able to use SCP protocol with WinSCP against that server?
Did you try SFTP?
In general, the log file (and your use of an obscure SSH server) just confirmed that your have a quite specific problem, that is only likely to actually confuse those coming to this thread.

Reply with quote

Advertisement

MorgueFLB
Joined:
Posts:
4
Location:
Cape Town

Thanks again for your helpful response.

I connected to this server for several months using WinSCP with no problems. The server is a Windows 10 box. For SSH, it is running MobaSSH, found here: https://mobassh.mobatek.net/

I have not tried SFTP – is this simply a matter of changing the File Protocol, or will I have to make other changes?

You know WinSCP much better than I do, and you are no doubt therefore correct about the use of the 'obscure SSH server'. I wasn't aware that it might affect the connection. As far as I know, no changes have been made to the SSH server – otherwise I don't think PuTTY would work.

If you still think I should create a new thread, I'll do so.

Thanks very much Martin.

Reply with quote

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

I wasn't aware that it might affect the connection. As far as I know, no changes have been made to the SSH server - otherwise I don't think PuTTy would work.
Something must have changed. Either on server. Or in your WinSCP configuration. Maybe you have used SFTP protocol before. Just try to change the protocol. No other configuration should be needed.

That PuTTY works has nothing to do with your problem. PuTTY is not SCP/SFTP client.

Reply with quote

MorgueFLB
Joined:
Posts:
4
Location:
Cape Town

I will give the SFTP protocol a try. I'm completely positive I didn't use it before, but just in case it works, I will try any suggestion :)

Regarding PuTTY, I was highlighting the fact that the server can be accessed via SSH on port XX with the supplied credentials, thereby eliminating those items as possible causes of the problem.

Reply with quote

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

MorgueFLB wrote:

Regarding PuTTy, I was highlighting the fact that the server can be accessed via SSH on port XX with the supplied credentials, thereby eliminating those items as possible causes of the problem.
The "server can be accessed via SSH on port XX with the supplied credentials" even with WinSCP. You get a problem only later, when WinSCP tries to talk to the shell.

Reply with quote

Advertisement

sloncer
Guest

Issue Resolved

My WinSCP session was stuck at "starting a session". The issue I had was in the .bashrc file I had a command to sudo to another user. Once I removed this line, WinSCP worked. So please make sure .bashrc doesn't have sudo or cd to a directory that has no permission for the user.

Reply with quote

Advertisement

sridevi
Guest

Facing starting the session stuck issue with WinSCP terminal

When trying to open WinSCP terminal the terminal is stuck at starting the session line and not proceeding further. Please help to resolve this error

Capture.PNG

Reply with quote

TheG
Guest

NetScaler specific setting

Was having this problem too with ADC/NetScaler – even though has worked in the past fine on countless upgrades and worked on another NetScaler fine on the same day.
Took a while to figure out – but I had to go into the "Raw Site Settings" in the Advanced drop down while configuring the initial connection. Then Add button -> select Shell from the list, type shell – as the Shell to use (since this is the first command to enter in NetScaler when ssh to the appliance).

Hope this helps someone.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum