Topic "hostname not retrieved from stored session"

Author Message
dreherthomi
[View user's profile]

Joined: 2010-09-17
Posts: 5
Location: Perth, Australia
WinSCP 4.27 Build 758 - Windows Server 2003 - Protocol:SFTP

1) WinSCP stored session "bmwfru" has an ip address under 'hostname'.
2) From the WinSCP Windows Program,I can open the session to a SFTP server successfully.
3) From the commandline, opening the same session the result is:
- searching for host ....
- gethostbyname unknown error.

Checking the logfile I can see that Winscp is trying to resolve the sessionname as hostname, instead of the value stored in the hostname field (ip address).Please see partial logfile below).

After renaming the sessionname to the ip Address, it worked from the commandline as well. After that, I even could rename back to the BMWFRU session name and it also worked again.

I am unsure if this is a known bug, a settings issue or somehow my error.


. -------------------------------------------------------------------------
. WinSCP Version 4.2.7 (Build 758) (OS 5.2.3790 Service Pack 2)
. Login time: Friday, 17 September 2010 9:48:40 AM
. -------------------------------------------------------------------------
. 09:48:40.203 Session name: bmwfru
. 09:48:40.203 Host name: bmwfru (Port: 22)
. 09:48:40.203 User name: (Password: No, Key file: No)
. 09:48:40.203 Tunnel: No
. 09:48:40.203 Transfer Protocol: SFTP (SCP)
. 09:48:40.203 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 09:48:40.203 Proxy: none
. 09:48:40.203 SSH protocol version: 2; Compression: No
. 09:48:40.203 Bypass authentication: No
. 09:48:40.203 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 09:48:40.203 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 09:48:40.203 SSH Bugs: -,-,-,-,-,-,-,-,-
. 09:48:40.203 SFTP Bugs: -,-
. 09:48:40.203 Return code variable: Autodetect; Lookup user groups: Yes
. 09:48:40.203 Shell: default, EOL: 0
. 09:48:40.203 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 09:48:40.203 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 09:48:40.203 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 09:48:40.203 Cache directory changes: Yes, Permanent: Yes
. 09:48:40.203 DST mode: 1
. 09:48:40.203 ------------------------------------------------------------
. 2010-09-17 09:48:40.203 Looking up host "bmwfru"
. 09:51:56.234 ------------------------------------------------------------
. 09:51:56.234 WinSCP Version 4.2.7 (Build 758)(OS 5.2.3790 Service Pack 2)
. 09:51:56.234 Login time: Friday, 17 September 2010 9:51:56 AM
. 09:51:56.234 ------------------------------------------------------------
. 09:51:56.234 Session name: BMWFRU
. 09:51:56.234 Host name: BMWFRU (Port: 22)
. 09:51:56.234 User name: (Password: No, Key file: No)
. 09:51:56.234 Tunnel: No
. 09:51:56.234 Transfer Protocol: SFTP (SCP)
. 09:51:56.234 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 09:51:56.234 Proxy: none
. 09:51:56.234 SSH protocol version: 2; Compression: No
. 09:51:56.234 Bypass authentication: No
. 09:51:56.234 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 09:51:56.234 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 09:51:56.234 SSH Bugs: -,-,-,-,-,-,-,-,-
. 09:51:56.250 SFTP Bugs: -,-
. 2010-09-17 09:51:56.250 Return code variable: Autodetect; Lookup user groups: Yes
. 09:51:56.250 Shell: default, EOL: 0
. 09:51:56.250 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 09:51:56.250 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. [img]09:51:56.250 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 09:51:56.250 Cache directory changes: Yes, Permanent: Yes
. 09:51:56.250 DST mode: 1[/img]
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Do you run WinSCP command line in the same environment (Windows account, path, from the same directory, etc..) as the GUI?
_________________
Martin Prikryl
dreherthomi
[View user's profile]

Joined: 2010-09-17
Posts: 5
Location: Perth, Australia
I think I know now what the issue is here.
The session BMWFRU is stored under a subfolder and therefore must be initiated from the command prompt like this:
winscp>open FOLDERNAME/BMWFRU

otherwise if trying to run like this:
winscp>open BMWFRU
WinSCP tries to connect to an actual host called BMWFRU.

This topic can be closed. Sorry for the inconvenience.
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