Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 801583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:27:50+00:00 2026-05-14T23:27:50+00:00

I try to start plink.exe (PuTTY Link, the command line utility/version of PuTTY) from

  • 0

I try to start plink.exe (PuTTY Link, the command line utility/version of PuTTY) from a C# application to establish an SSH reverse tunnel, but it does no longer work as soon as I pass the correct parameters.

What does that mean? The following works as expected: it opens a command line window, displays that I forgot to pass the password for the -pw argument quits, and shows the prompt. I know it got the arguments, since it specifically requests the one thing I did not provide.

Uri uri = omitted;
ProcessStartInfo info = new ProcessStartInfo();
info.FileName = "cmd";
info.Arguments = "/k \"C:\\Program Files (x86)\\PuTTY\\plink.exe\" -R 3389:" + uri.Host + ":" + uri.Port + " -N -l username -pw"; // TODO pwd
Process p = Process.Start(info);

I tried the same think with calling plink.exe directly instead of cmd.exe /k, but the window closes immediately, which is unfortunate for bug-hunting.

BUT when I pass a password in the arguments, plink.exe displays the program help (showing available parameters) and quits:

Uri uri = omitted;
ProcessStartInfo info = new ProcessStartInfo();
info.FileName = "cmd";
info.Arguments = "/k \"C:\\Program Files (x86)\\PuTTY\\plink.exe\" -R 3389:" + uri.Host + ":" + uri.Port + " -N -l username -pw secretpassword";
Process p = Process.Start(info);

No indication of missing parameters. Both the cmd /k and plink.exe variants do not work (the latter closes immediately, so no information regarding different behaviour).

When I launch the application from the Windows 7 Start Menu launcher with the identical parameters, it opens a cmd.exe window and establishes the connection as requested.

What’s wrong? Is there a way plink.exe notices it’s not running in a real shell? If yes, how can I circumvent it, like the Start Menu “prompt” does?

I hope this question is right on SO, since it, though specifically for a single application, revolves around launching it successfully programmatically.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T23:27:51+00:00Added an answer on May 14, 2026 at 11:27 pm

    Yes, this web page suggests that Putty gets edgy about non-interactive logons. If the suggested workaround doesn’t help, I recommend you ask questions about it at a Putty support forum or Superuser.com. It’s got otherwise nothing to do with the Process class or the C# language.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I frequently start with a simple console application to try out an idea, then
Sometimes when I try to start Firefox it says a Firefox process is already
Apache just fails to start with NO error message when we try to reboot
Right now we just use something like this stopWatch.Start(); try { method(); } finally
I try to add an addons system to my Windows.Net application using Reflection; but
I have a code for jta transcations as follows: try{ //start jta user transcation
I would like to ask a few questions: •How to execute the command C:\strawberry\perl\bin\perl.exe
try: F2 start editing and ENTER stop editing and the focus switches to the
i try to start multiple Instance of MongoDB as a Service. Under the commandline
self.logger.info(msg) popinstance=poplib.POP3(self.account[0]) self.logger.info(popinstance.getwelcome()) popinstance.user(self.account[1]) popinstance.pass_(self.account[2]) try: (numMsgs, totalSize)=popinstance.stat() self.logger.info(POP contains + str(numMsgs) + emails)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.