I work at a university, and we have a remote machine(1) that I ssh into.
To do this from my laptop, I believe that I have to first ssh into the university system and then ssh into the particular machine. This all happens automatically for me because the ssh config file has been set up for me. I just type:
ssh -Y comp_name
and I'm in.
I'm currently trying to ssh FROM a totally unrelated remove machine(2) - nothing to do with the university. To ssh from this into my remote_machine(1), I do two separate ssh's:
1. Into the university (ssh-gateway)
2. Into remote_machine(1)
So far so good.
What I want to do is to transfer a file using scp from remote_machine(2) to remote_machine(1). How do I do this when there are these two steps involved?
I initially tried:
scp ./file.txt username@ip_of_remote_machine(1)
but it says
connection refused
I think this is because I need to go into the university network first.
I know my terminology isn't correct, but hopefully you understand what I mean.