A message for Linux.com registered users: We are in the process of making changes to the Linux forums. Starting Monday, 8/13/18 at 6:00 PM PT, you will be unable to access the forums. They will re-launch as soon as possible on Wednesday, 8/15/18 with new features and improved functionality. Thank you for your patience and stay tuned for the new improved forums.

October 14, 2010

REPOSTED in Linux Applications

Hi, I've been recently implementing a program that will access incoming data by forwarding data from an ip address to a local port and gathering that data, using these commands.

ssh -l ec34 -L 12345:127.0.0.1:10237 192.101.77.209 -n

Unfortunately this command takes up the command line, and when i add a '&' to it, I get the error:

Pseudo-terminal will not be allocated because stdin is not a terminal.

A wise friend of mine suggested looking into Environment Variables and modify one. I used the code:

foreach $key (sort keys(%ENV)) {
print "$key = $ENV{$key}

\n";
}

To display these variables, but found nothing I felt I could use against this error. I'm thinking I may be missing a parameter in the `ssh...` command once I have added an ampersand & to it, or I have now confused it into thinking it's going to output into standard in (possibly as a default for the background), and I dont know why. Does anyone know how I can connect this data to a local port behind the scenes?

Click Here!