Bug 3034 - provide options to map additional FDs
Summary: provide options to map additional FDs
Status: NEW
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 8.0p1
Hardware: Other Linux
: P5 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-10 23:44 AEST by brian
Modified: 2019-07-10 23:44 AEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description brian 2019-07-10 23:44:56 AEST
While it's really cool that ssh will map the remote's std{in,out,err} to the local FDs representing those streams, it would be nice to be able to map additional remote FDs to local FDs.

A working example of how this might be useful:

#!/bin/bash

exec 3>/tmp/remote_xtrace
ssh --map_fd 3:3 remote "export BASH_XTRACEFD=3; id; ls -l"

That way one can get the xtrace of the remote script being run without it polluting the stderr stream.

I am sure there are tons of other examples of how this would be useful.