I'd like to speed up connecting to specific servers.
I have the servers let's say:
123.123.123.1
123.123.123.2
123.123.123.3
I normally connect with the following:
ssh -p 12345 [email protected]
This is a pain because the only difference between the servers is the last number of the ip.
I tried the following code:
alias ssht='{ ip=$(cat -); ssh -p 12345 my_user@"123.123.123.$ip"; }<<<'
However I get an error:
karl@karls-laptop ~/scripts $ ssht 1
Pseudo-terminal will not be allocated because stdin is not a terminal.
Is there a way to get this working?