LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Setting up TTY's to ssh into another computer on boot? (https://www.linuxquestions.org/questions/debian-26/setting-up-ttys-to-ssh-into-another-computer-on-boot-383343/)

microsoft/linux 11-15-2005 09:04 AM

Setting up TTY's to ssh into another computer on boot?
 
I've got a cluster(6 machines), and it takes a little while to change to each console, log in, then ssh into these machines. Is there a way to change something so as to set the TTY's to automatically have the TTY's ssh into these other machines? Or is there something else that would allow me to do this?

haertig 11-15-2005 04:36 PM

I don't think you can do this and maintain any shred of security. However, if you don't care about security you might investigate setting up /etc/inittab to spawn ssh directly to your tty's instead of the normal getty's. You could also setup RSA authentication in ssh so that you wouldn't need to enter any passwords. But if you're willing to expose yourself so, might as well just use rlogin, .rhosts and/or hosts.equiv instead of ssh.

But like I said ... you would have no pretense of even minimal security with such a setup. I certainly wouldn't recommend doing what you're considering. No offense intended, but if you're using this to login to remote systems where you are not the sysadm, those remote sysadms would be well within their rights to smack you 'up side of the head!

microsoft/linux 11-15-2005 04:40 PM

This is a personal cluster, on a private network. I am the sysadmin, and noone else other than me has access to these machines. I would be ssh'ing in as user, then su'ing to root(if needed). I just want a simple way to control these machines w/out needing a monitor and keyboard, or needing to take the time to login, then ssh in. Thanks for the concern though.

haertig 11-15-2005 04:47 PM

OK. Good. I was incorrectly assuming you were in a work situation. Setting up something like that were I work would lead to, well, a "career altering experience". :(

microsoft/linux 11-15-2005 05:53 PM

right, I understand that. I wouldn't do anything to compromise the security of any workplace. Currently, I'm a high school student, and did a independant study w/ the sysadmin at my old school. I understand the importance of network security. I've never messed with /etc/inittab before, what do I need to change about it?

haertig 11-16-2005 12:01 PM

I haven't messed with an inittab to do this type of stuff for many many years. (Normal inittab stuff, yes. Inittab to spawn an ssh process, no.) And that was not on Linux, but on some other Unix system (System V? HP-UX? I really can't remember). So instead of possibly leading you astray with my old knowledge, I'll point you towards others trying to do the same thing. I quickly glanced at the followups to this person's post, and the replies are right along the lines of what I was remembering.

http://lists.debian.org/debian-user/.../msg00407.html

One thing I would recommend though, is if you look at the followups at least one reply mentions changing inittab so it respawns a getty that in turn invokes ssh. For testing, I would change that "respawn" to "once" so that if it fails, it won't keep trying (and failing) over and over. Check out "man inittab" to see all the field meanings. Once you get ssh to behave as you want, then you can turn on respawn if you so desire. Be sure and backup your inittab file before you go hacking on it. A few typos here and there and you might be in a world of hurt! You might also consider changing your default booting runlevel to 1 (it's probably 2 now, Debian system default). Then you default boot to single-user mode and can manually move to your normal runlevel for testing with "telinit 2" (as root). So if you royally screw the pooch and nuke runlevel 2 by accident, you can just reboot and you'll be back in single-user mode and can fix inittab. Hopefully.


All times are GMT -5. The time now is 06:45 AM.