How to Create Session under different User Credentials

Advertisement

jhojnacki
Joined:
Posts:
5
Location:
Northern Ohio

How to Create Session under different User Credentials

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,

Reply with quote

Advertisement

jhojnacki
Joined:
Posts:
5
Location:
Northern Ohio

Support Info

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

Reply with quote

jhojnacki

Problem Resolved

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.

Reply with quote

Advertisement

You can post new topics in this forum