[Mono-dev] Possible with Mono/How to

Colt D. Majkrzak majkrzak at gmail.com
Sat May 26 23:46:41 EDT 2007

 I actually discovered a clear cut way on how to do this, after some messing
around with mono and SSHD.


Here's how you do it, for anyone interested:


First build your executable, and mkbundle the executable.

Take the output mkbundle, rename if you didn't use -o and place it in the
filesystem, I choose /bin/ (Where most your linux shells reside)

Next you will need to edit two things in the system itself, you will need to
edit /etc/shells and add a new line with the /path/to/mymkbundledmonoproject

Then change the user you wish to have only the mono project as a shell,
there shell entry to /path/to/mymkbundledmonoproject


Login as user, and you should be looking at your mono project, very useful
for giving 'shell' access but with your own twist so your end users can't
break themselves.


Now you have the all power of SSHD, secured (assuming you've disabled telnet
like I have on all my production servers), and never had to write a single
line of socket code, and even if the user Control breaks out of the mono
app, the system will terminate their connection. J


From: Matthew McDonald [mailto:mail.matt.mcdonald at gmail.com] 
Sent: Saturday, May 26, 2007 10:28 PM
To: Colt D. Majkrzak
Subject: Re: [Mono-dev] Possible with Mono/How to


Just a thought but...

When they log into your system via SSH you could have it run a script which
looks like this:


#code to run your mono app goes here


-Matt McDonald

On 5/26/07, Colt D. Majkrzak <majkrzak at gmail.com> wrote:



I'm currently working on a project to create a menu driven interface across
SSH in my server for customers.  Mono seems to be running it great, but the
problem I'm running into is that I want the end user to login, and be locked
into my mono driven .NET application.  I've tried a few different ways to
make mono act as a shell, and various bash scripts without much success, I
always am able to break back to bash hitting Control +C a couple times.  Is
there a way via some C# code, bash, or making my .NET app act as a shell
interface to SSHD to prevent this?




Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070526/980d2708/attachment.html 

More information about the Mono-devel-list mailing list