0

This may be related to this question

I have a script on a remote machine. I run the script by logging into the remote machine via SSH and executing it there. The script generates output in the form of a .pdf file.
I'd to like end up with the file downloaded or created on my local computer.

Using CLIENT=${SSH_CONNECTION%% *} the script can find out the hostcomputer's name (or IPv6 designation), but to use scp on the remote I also need the local username. As far as I understand that is a no-go for SSH as this information is not shared across the ssh connection.

The only solution I can think of is to pass the user@computer:/path/to/download as a parameter to the remote script in order for scp to use.

I have root access on all locals and remotes.

Are there any alternative solutions I might try?

Mausy5043
  • 1,327
  • 3
  • 9
  • 13

0 Answers0