TyphoonJoe
March 15th, 2007, 01:46 PM
This is for a text user only server, forget all gui stuff :)
I want to set up captive logins using ssh. By "captive login" I mean I want text users to be placed into a menu on login, and when the exit the menu they exit Linux. The solution for now is adding the menu script to $HOME/.profile (this is for ksh, same as bash_profile for bash), followed by an exit. This works perfectly for text users connecting with telnet.
With ssh it works, but not fully because the user can always connect from their ssh client using "ssh -t <servername> <command>" And if they use a remote command of ksh, bash, or some other shell, the user has full Linux command line access. They simply do not hit the defalt shell at all. Even if you change /etc/passwd so the default shell is actually a command to the menu script, the user can specify a ssh remote command to gain Linux command line access.
Though telnet works, it is not at all secure and not a good alternative. It also seems I could use ssh keys, but I cannot require a key for every user, there are too many and they change too often. I basically want to have ssh allow shell access but NOT allow remote commands to be run. Anyone know how to do this????
Thanks for any ideas!
TyphoonJoe
I want to set up captive logins using ssh. By "captive login" I mean I want text users to be placed into a menu on login, and when the exit the menu they exit Linux. The solution for now is adding the menu script to $HOME/.profile (this is for ksh, same as bash_profile for bash), followed by an exit. This works perfectly for text users connecting with telnet.
With ssh it works, but not fully because the user can always connect from their ssh client using "ssh -t <servername> <command>" And if they use a remote command of ksh, bash, or some other shell, the user has full Linux command line access. They simply do not hit the defalt shell at all. Even if you change /etc/passwd so the default shell is actually a command to the menu script, the user can specify a ssh remote command to gain Linux command line access.
Though telnet works, it is not at all secure and not a good alternative. It also seems I could use ssh keys, but I cannot require a key for every user, there are too many and they change too often. I basically want to have ssh allow shell access but NOT allow remote commands to be run. Anyone know how to do this????
Thanks for any ideas!
TyphoonJoe