I am currently writing a custom shell for a project for an Operating Systems class. I have the basic functionality working, as well as redirection, piping and other things. I am using the execvp() command for executing commands already present in the PATH variable.
One of the requirements for this shell is to remotely connect to another computer, similarly to the way one would do on linux like ssh root@hostname. Of course it doesn’t have to be secure or anything at all like SSH, just basic remote functionality.
I am not sure how to tackle this problem. Any tips for where to start or how to approach the problem would be welcome.
Thanks!
Environment:
Ubuntu 12.10
Compiling with Clang
Traditional shells aren’t involved in remoting; ssh does all of that, and sh/bash/ksh/etc. are run after the connection is established.
When you login to a user account the shell that’s configured in
/etc/passwdwill be run. All you should have to do is list your shell in your user’s entry. You can set a user’s shell withchsh, or by editing/etc/passwdmanually.You may also want to add your shell to
/etc/shells.