How do get a shell with mgetty?
Howdy, I asked the other day what the best way to set up a dialup server was (the goal being to get a remote shell). The uanimous answer was to use mgetty. I now have mgetty set up and working just fine, with one problem: I don't know how to use it as a shell. I know it works because I set up wvdial on our Red Hat box with my username and password and it dialed up and connected just fine. However, it tries to start ppp (which isn't really what I need, I don't think) and then after a bit the pppd dies because (of course) no connection is made. So basically, I can connect (thus I know mgetty is working) but I can't figure out how to get a shell out of the deal. Can anyone explain how to get a shell prompt? Am I even supposed to be using wvdial or should I be using some shell script? If a shell script could I see an example? TIA, ---------------------------------------- Jonathan Wilson System Administrator Cedar Creek Software http://www.cedarcreeksoftware.com Central Texas IT http://www.centraltexasit.com
On Monday 08 January 2001 15:54, Jonathan Wilson wrote:
Howdy,
I asked the other day what the best way to set up a dialup server was (the goal being to get a remote shell).
The uanimous answer was to use mgetty.
I now have mgetty set up and working just fine, with one problem: I don't know how to use it as a shell.
You don't. mgetty is just a respawning answering service that presents the caller with the login and password prompt. The login athenticates the user and if the user account is found it passes control to the shell designated in passwd when the account was setup up. JLK
I know it works because I set up wvdial on our Red Hat box with my username and password and it dialed up and connected just fine. However, it tries to start ppp (which isn't really what I need, I don't think) and then after a bit the pppd dies because (of course) no connection is made. So basically, I can connect (thus I know mgetty is working) but I can't figure out how to get a shell out of the deal.
Can anyone explain how to get a shell prompt? Am I even supposed to be using wvdial or should I be using some shell script? If a shell script could I see an example?
TIA,
---------------------------------------- Jonathan Wilson System Administrator
Cedar Creek Software http://www.cedarcreeksoftware.com
Central Texas IT http://www.centraltexasit.com
-- Scientific theories, according to Sir Karl Popper, can be "falsified," or proven wrong, by experiment. Unscientific theories -Marxist dialectical history and Freudian psychology were Popper's favorites- are formed in such a way that they cannot be falsified by data.
On Monday 08 January 2001 15:54, Jonathan Wilson wrote:
Howdy,
I asked the other day what the best way to set up a dialup server was (the goal being to get a remote shell).
The uanimous answer was to use mgetty.
I now have mgetty set up and working just fine, with one problem: I don't know how to use it as a shell.
I know it works because I set up wvdial on our Red Hat box with my username and password and it dialed up and connected just fine.
You don't need wvdial. mgetty answers the phone just fine and presents the login to the caller. If the caller has a correct account name and password the login pgm hands off to the shell designated in the user account when it was step up. Sometimes that shell is just bash. Other times it is a bash script, for example, that is is indicated by /home/<acctname>/scriptname in passwd. scriptname is marked executable, of course. When the exit command is encountered in scriptname that is the same as loging out. JLK
However, it tries to start ppp (which isn't really what I need, I don't think) and then after a bit the pppd dies because (of course) no connection is made. So basically, I can connect (thus I know mgetty is working) but I can't figure out how to get a shell out of the deal.
Can anyone explain how to get a shell prompt? Am I even supposed to be using wvdial or should I be using some shell script? If a shell script could I see an example?
TIA,
---------------------------------------- Jonathan Wilson System Administrator
Cedar Creek Software http://www.cedarcreeksoftware.com
Central Texas IT http://www.centraltexasit.com
-- Scientific theories, according to Sir Karl Popper, can be "falsified," or proven wrong, by experiment. Unscientific theories -Marxist dialectical history and Freudian psychology were Popper's favorites- are formed in such a way that they cannot be falsified by data.
I now have mgetty set up and working just fine, with one problem: I don't know how to use it as a shell.
I know it works because I set up wvdial on our Red Hat box with my username and password and it dialed up and connected just fine. However, it tries to start ppp (which isn't really what I need, I don't think) and then after a bit the pppd dies because (of course) no connection is made. So basically, I can connect (thus I know mgetty is working) but I can't figure out how to get a shell out of
Hi, On 1/8/01 at 3:54 PM wilson@claborn.net wrote: <snip> the deal.
Can anyone explain how to get a shell prompt? Am I even supposed to be using wvdial or should I be using some
shell script?
If a shell script could I see an example?
What are you using for a terminal app? I think it would be easier to use minicom to check the connection rather than wvdial. It can dial up and should present you with the login prompt without trying to start ppp and maybe you can see where it gets stuck. If you need a secure connection, perhaps you should set up ppp and run something like OpenSSH on top (IIRC you need ppp to provide the tcp/ip layer for ssh). HTH, Tim
On Mon, Jan 08, 2001 at 03:54:28PM -0600, Jonathan Wilson wrote:
Howdy,
I asked the other day what the best way to set up a dialup server was (the goal being to get a remote shell).
The uanimous answer was to use mgetty.
I now have mgetty set up and working just fine, with one problem: I don't know how to use it as a shell.
You don't use mgetty as a shell. mgetty is a specialized getty. It listens on your modem port and if someone is knocking it starts normally /bin/login which in turn - after a successful login - starts a shell. Configure minicom, start minicom and do something like: ATZ[enter] The modem should answer with: OK and all is well. Now dail your machine: ATDT0123456789[enter] The AT-command tells your modem to use a dial tone to dial the number. You should hear the modem dial out and after some time see something like: Connect Now you should see your normal login prompt: hostname login: Just type your login and password and everything should work fine. You can now work as if your are sitting on the console. N.B. most distributions don't allow root to login in this way. login as a normal user an do 'su -' when needen. Regards, Cees.
participants (4)
-
Cees van de Griend
-
Jerry Kreps
-
Tim Duggan
-
wilson@claborn.net