I’ve set up an alias in my bashrc so I can access the cluster at work from home. However, to run programmes on it, I’d like to login to my work computer. How do I add that hostname so I can use one alias?
I’ve tried just extending the alias by alias WORK=”ssh user@work; user@hostname”, but I still only have access to my files and can’t run anything. If I run the second part again once logged in, it then works. home is the same for both if that makes a difference as I tried to add another key.
ssh -A -t user@work ssh -A user@hostnameThe
-Aoption enables agent forwarding. The-toption is to force a pseudo-tty to be allocated. Normally, when your ssh command specifies a command to be run on the target host, no pseudo-tty will be allocated. If you want the command to run and then exit you do not need to use the-toption, but if you want an interactive shell session then you’ll need a pseudo-tty.