Skip to content

Standalone mode #19

@1mm0rt41PC

Description

@1mm0rt41PC

I'm trying to create a standalone agent for Cygwin and Putty (like the one mentioned on dlech/KeeAgent#216) but I'm having trouble figuring out how to implement it.
I have actually do this sample but it doesn't work. Do you have a basic example ?

using dlech.SshAgentLib;
using System;
using System.Threading;

namespace StandaloneSSHAgent
{
	class Process
	{
		private static ManualResetEvent exitEvent = new ManualResetEvent(false);
		public static void Main(string[] args)
		{
			Console.CancelKeyPress += delegate(object sender, ConsoleCancelEventArgs e) {
				e.Cancel = true;
				exitEvent.Set();
			};
			PageantAgent pa = new PageantAgent();
			pa.StartCygwinSocket(GetEnvironmentVariable("SSH_AUTH_SOCK"));
			//pa.StartMsysSocket(GetEnvironmentVariable("SSH_AUTH_SOCK"));
			//pa.StartWslSocket(GetEnvironmentVariable("SSH_AUTH_SOCK"));
			pa.StartWindowsOpenSshPipe();
			
			exitEvent.WaitOne();
			Console.WriteLine("exited gracefully");
		}
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions