I'm using Mac 10.9.5 and bash shell. In our environment, we have to go through a proxy (a CentOS machine) to SSH properly into a destination machine (another CentOS machine). What I would like to do is create a shortcut so that I can scp files quickly to the destination server, something like
scp localfile.txt davea@server:/home/davea
But right now, I have to do multiple commands to transfer the file …
scp localfile.txt davea@proxy:/home/davea
ssh davea@proxy
scp localfile.txt davea@server:/home/davea
Is it possible to condense the above into one line?