Can I ssh into a specific computer on server?

6

2

When ssh into a collection of computers on my University server I get assigned a particular machine and the machine changes every time (I assume based on how much each is being used). In other words when I type,

ssh username@servername

I get,

username@nws##:~$

where ## is some number between 1-25. However, I would like to create processes on several machines and would rather select which computer I am ssh'ing into. Is there a way for me to choose which machine I want to use?

JeffDror

Posted 2015-06-20T15:44:48.447

Reputation: 181

Answers

10

you could probably ssh into the desired machine once you've already ssh'd into the server, as all the computers are likely connected under a NAT and probably know each others' names. so e.g.

me@me: ~ $ ssh me@uni_server
logging in etc
me@random_machine_in_server: ~ $ ssh me@desired_machine

erp

Posted 2015-06-20T15:44:48.447

Reputation: 263

Why didn't I think of that... That's another possibility. – Tonny – 2015-06-20T15:54:36.870

5

Servername is not a real server but a load-balancer that re-directs you to one of the servers in the pool. At least.. That is what it looks like.

2 ways to get the same real machine:

1) Talk to the server administrator and ask nicely. They may have a way to make this happen if you really need this functionality for your university work.

2) After you login check the ip-address of the node you are on. ("ifconfig -a" might help). Try connecting again using explicitly this ip-address in stead of the servername. This is not guaranteed to work. There are multiple ways in which this can be setup and this only works for a few of them.

3) See the answer by "erp". Credit where credit is due :-)

Tonny

Posted 2015-06-20T15:44:48.447

Reputation: 19 919

1Note that if the load balancing is being done at the IP level rather than the DNS level, method 2 won't work. – Mark – 2015-06-20T19:16:24.097

2Asking the administrator is the best idea for two reasons. They know how they did the load balancing. And they might get grumpy if they feel users attempt to bypass the load balancing. – kasperd – 2015-06-20T22:04:28.613

1@kasperd Being a sys-admin myself there was a reason I made that number 1 :-) – Tonny – 2015-06-22T07:44:09.547