PowerShell Remoting Project Home

Friday, March 17, 2006

Securely Extend Msh Host User Interface over Network

Added at 20th Mar, 22:20
There is a followup post here.

Securely extend Msh Host User Interface over network using NegotiateStream.

If you follow my previous post, you will find out that I changed my strategy. There is no need to sent Mshobjects to remote client. We just need to implement a customized MshHostUserInterface which get input and write result to remote client. Monad is designed to be extended in this way, so it only took me a couple of days to get a usable solution. You can download testing binary at gotdotnet.

Server

Client

The underline idea is to implement all APIs in MshHostUserInterface and MshHostRawUserInterface. It was much easier than I originally thought. But  I still had some problems with
public override Dictionary Prompt(string caption, string message, Collection descriptions)   { }

public override int PromptForChoice(string caption, string message, Collection choices, int defaultChoice) { }

public override MshCredential PromptForCredential(string caption, string message, string userName, string targetName)  { }

public override MshCredential PromptForCredential(string caption, string message, string userName, string targetName, MshCredentialTypes allowedCredentialTypes, MshCredentialUIOptions options)   { }

public override SecureString ReadLineAsSecureString()   { }
in MshHostUserInterface and
public override KeyInfo ReadKey(ReadKeyOptions options) { }

public override void ScrollBufferContents(Rectangle source, Coordinates destination, Rectangle clip, BufferCell fill)   { }

public override void SetBufferContents(Coordinates origin, BufferCell[,] contents)  { }

public override void SetBufferContents(Rectangle rectangle, BufferCell fill)   { }
in MshHostRawUserInterface.

That is to say: all sercurestring-related, credential-related, scroll console-related cmdlet are not working. But it is really fun to run some test on remote machine. Try out yourself by downloading the testing binary at gotdotnet.

Monad Rocks!

Have Fun!

Tags:    


Comments:
Awesome stuff tony! Do you have someone from the Monad team helping work through the issues? If not, contact me.

Jeffrey Snover
Monad Architect
jsnover@microsoft.com
 
Thanks. Any help would be appreciated!
 
i had fun playing around with this.
I can't wait 'til the client side can pass credential information to log onto the remote desktop or server :)
 
While testing me and dbmws noticed that output of 'legency' commands will show up on the serverside

e.g.

ping 127.0.0.1

or

"testing" | findstr "test"

gr /\/\o\/\/
 
To /\/\o\/\/,

That's big problem. I don't know how to do with it now.

I can't redirect them to client if I don't know how monad deal with output of 'legency' commands.

Got to ask monad team this question.
 

Post a Comment





<< Home