ssh into beowulf cluster

Posted:
in Genius Bar edited January 2014
Ok, here's a question for all you command line addicts out there:



I have a beowulf cluster that I ssh into, using 'ssh adroit.princeton.edu'. I have the keychain and various environmental variables and junk set up so that it authenticates me automatically (via rsa i think). Once I'm logged in, I switch to a specific node using the command 'ssh adroit-001'.



Now, what I want to do is either put this junk all into an alias or a shell script so that can just type something like 'shadone' and it will automatically log me into the specific node.



I've tried simply doing 'ssh adroit.princeton.edu ssh adroit-001', but that results in the error, 'Pseudo-terminal will not be allocated because stdin is not a terminal.' and leaves me without a command prompt. I can exit out, and get the error, 'TERM environment variable not set.'



I also tried 'ssh adroit.princeton.edu; ssh adroit-001', but that just waited until I exit from the first ssh to try the second, and of course it doesn't know where adroit-001 is. Also, 'ssh adroit-001.princeton.edu' does not work.



So is there any way to do what I want, or am I just screwed here?



and I should note that I've read the man page and specifically looked at the -t and -T variables, and I have no idea what the heck they do.



Thanks much



C

Comments

  • Reply 1 of 4
    MarvinMarvin Posts: 15,326moderator
    Try running a remote command using:



    ssh adroit.princeton.edu "ssh adroit-001"



    If that works, put an alias in your ~/.profile file, which is your bash shell settings file. You may have to make one first using touch ~/.profile. You have to open a new shell after you make changes to .profile.
  • Reply 2 of 4
    celemourncelemourn Posts: 769member
    Quote:
    Originally Posted by Marvin View Post


    Try running a remote command using:



    ssh adroit.princeton.edu "ssh adroit-001"



    If that works, put an alias in your ~/.profile file, which is your bash shell settings file. You may have to make one first using touch ~/.profile. You have to open a new shell after you make changes to .profile.



    well, that sort of worked. I don't have the bash prompt, but I can receive output from the server. It comes line by line and unformatted though.
  • Reply 3 of 4
    karl kuehnkarl kuehn Posts: 756member
    It might be that you can just ssh straight into adroit-001.princeton.edu. But the better question is why you need to switch to a specific node in the cluster? If it really is a beowolf cluster (and not some other form of cluster) then you should not ever care about what node you come in on. And even in more common forms of *nix clusters all of the machines should be configured the same way and your home directory should be on remote storage anyways (so you don't have to care as a normal user). The only time it should matter is if you have processes running on one machine and want to make sure that additional processes are running on the same machine. But if you are on a beowolf cluster than your IPC mechanism should take care of even that need.
  • Reply 4 of 4
    celemourncelemourn Posts: 769member
    Quote:
    Originally Posted by Karl Kuehn View Post


    It might be that you can just ssh straight into adroit-001.princeton.edu. But the better question is why you need to switch to a specific node in the cluster? If it really is a beowolf cluster (and not some other form of cluster) then you should not ever care about what node you come in on. And even in more common forms of *nix clusters all of the machines should be configured the same way and your home directory should be on remote storage anyways (so you don't have to care as a normal user). The only time it should matter is if you have processes running on one machine and want to make sure that additional processes are running on the same machine. But if you are on a beowolf cluster than your IPC mechanism should take care of even that need.



    ssh directly to adroit-001.princeton.edu does not work. The reason for logging into specific nodes is that nodes 1 and 2 have four Tesla video cards each, and I'm programming for CUDA (nvidia's api for dumping generic parallel computations onto the GPU.) So in order to run CUDA programs, I have to send the jobs directly to those two nodes. I'm still learning the api though, so it's more practical to just go to the node directly than to do a qsub.
Sign In or Register to comment.