Help - Search - Members - Calendar
Full Version: Ssh To Telnet
Linuxhelp > Support > Technical Support
Beethovan
I'm using SuSE linux 9.0, kernel version 2.4.21-99, using a static ip address. I am needing to set it up so that a users can SSH into this linux box and after verification it automatically redirects the users to another computer via Telnet. The server it's being redirected to is a SCO box and installing SSH on that box is not an option. I've been told that i can use iptables to do this task for me, but being that i'm a noob with linux, i am lost when it comes to setting up such a task. Any assistance would be appreciated.

Beethovan
hughesjr
Well ... you don't want to use iptables to port forward the user because that will allow the login to take place in clear text.

You initial comment about logging into the first server via SSH is a good one ... it will allow all comunications to be encrypted.

For the users that you want to automatically telnet to the SCO server, add this line to the bottom of their .bash_profile file in their home directory:

telnet -a ip_address

they will be prompted for their password and automatically login to the SCO server...don't add this line for accounts that need to be able to issue commands on the suse server...
Beethovan
Ok, now the account we're using on the SCO box is a Public access account and doesn't not use a password, so if i create the account on the SuSE box, add that string, once they log into the SuSE box, it will automatically redirected them via telnet to the SCO box, where they can just hit enter and automatically be logged in right? Thanks for the information btw. It really helps alot.

Beethovan

P.S. I also need to know if another command can be used to make it substitute the users (like su would) to a different account on the sco box, because we have a public account setup currently and would like to just have users access via that account
hughesjr
telnet -a passes the current username to the new box .... not what you want for this case. telnet -l username should do what you want...

telnet -l username ip_address

(-l is a lowercase L) ...
Beethovan
Thank you so much for the information, you've been a terrific help

Beethovan
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.