Topic "How to Create Session under different User Credentials"

Author Message
jhojnacki
[View user's profile]

Joined: 2012-12-21
Posts: 4
Location: Northern Ohio
I have a custom Windows Service on a VM that runs under service account credentials. The credentials have Log On as Service, but is not allowed to use Remote Desktop. Therefore, I cannot logon to the machine with the service account credentials.

The Windows Service shells out to a command prompt where it launches the command line version of WinSCP with the /script argument. The script is a text file that contains the open command. For example "open abc@def.net" where abc@def.net is the FTP site.

I have found that you need to logon to the machine with the credentials and run WinSCP to create the session. It seems to get saved with the logon credentials of the person who ran WinSCP.

But I cannot login with the Service Account credentials.

Is there a way for me to run WinSCP with my login credentials, and then somehow copy that session information to the Service Account credentials?

Thanks,
Advertisements
jhojnacki
[View user's profile]

Joined: 2012-12-21
Posts: 4
Location: Northern Ohio
I forgot to include the Support Info for this post.

The version is 5.1.0 (build 2625)

This is the first time that I am using WinSCP. It is not an upgrade.

The version of Windows is 32-bit Windows 2003 Server.

Here is the contents of the BAT file.
"C:\Program Files\WinSCP\winscp.com" /script="C:\Program Files\Company\MyApp\App_Data\MyAppParms.txt"

Here is the script, but for security reasons changed the real server name.

option batch abort
open abc@def.net
ls
exit
jhojnacki
[View user's profile]

Joined: 2012-12-21
Posts: 4
Location: Northern Ohio
Can the session and password be saved as a File that the Service Account user account may access?
jhojnacki
[View user's profile]

Joined: 2012-12-21
Posts: 4
Location: Northern Ohio
I found the option to save the session as the INI file, and then the Service Account user is able to load it. Also found the Logging option, and able to verify that it is loading from the INI file.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Also covered here:
https://winscp.net/eng/docs/faq_scheduler
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