Just wanted to try again with this problem to see
if I could generate any help.
Anyone on AIX run into this ?
Thanks,
Dave
(1/8/99)
David Yates wrote:
> Hi -
>
> I'm having a problem with ssh going thru a firewall
> between 2 AIX servers. (v4.3)
>
> The tunnel works, however, the following error
> message is generated.
>
> ---------------------------------------------------------------------
> machineA% ssh machineB
>
> Bareword found where operator expected at (eval 58) line 1, near "% &hd"
>
> (Missing operator before hd?)
> Operator or semicolon missing before &hd at (eval 58) line 1.
> Ambiguous use of & resolved as operator & at (eval 58) line 1.
> Bareword found where operator expected at (eval 59) line 1, near "% &hd"
>
> (Missing operator before hd?)
> Operator or semicolon missing before &hd at (eval 59) line 1.
> Ambiguous use of & resolved as operator & at (eval 59) line 1.
> Bareword found where operator expected at (eval 60) line 1, near "% &d"
> (Missing operator before d?)
> .
> .
> .
> ---------------------------------------------------------------------
>
> We are running perl v5.005 on both AIX ends.
>
> Attached, is a copy of the perl code which allows connects
> thru our firewall. Works fine if both servers are Solaris,
> but spews these messages above on AIX systems.
>
> We are running ...
>
> SSH Version 1.2.26 [rs6000-ibm-aix4.3.2.0], protocol version 1.5.
> Standard version. Does not use RSAREF.
>
> Any thoughts / pointers ?
>
> Thanks,
>
> Dave
>
> --
> _______________________________
>
> XEROX CORPORATION
> David J. Yates
> System Engineer
> USCO/IM Commerce Team
>
> 1350 Jefferson Road
> Mailstop 13B
> Rochester NY 14623
>
> Email: [EMAIL PROTECTED]
> Phone: (716) 427-1980 (x71980)
> Fax: (716) 427-3761
> _______________________________
>
> ------------------------------------------------------------------------
> #!/usr/local/bin/perl
> #
> # ssh-tunnel.pl
> #
> # Usage: ssh-tunnel.pl ssl-proxy port destination_host port
> #
> # This script can be used by ssh as a "ProxyCommand" to
> # traverse a www-proxy/firewall that supports the http CONNECT
> # command described in
> # http://home.netscape.com/newsref/std/tunneling_ssl.html
> #
> # Example, connect to host named "remote" outside of your firewall:
> #
> # $ ssh remote -o'ProxyCommand ssh-tunnel.pl www-proxy 80 remote 22'
> #
> # Better yet, insert the ProxyCommand definition for host "remote" in
> # your $HOME/.ssh/config file:
> #
> # .
> # .
> # Host remote
> # ProxyCommand /usr/local/bin/ssh-tunnel.pl www-proxy 80 %h %p
> # .
> # .
> #
> # Written by Urban Kaveus <[EMAIL PROTECTED]>
>
> require 'sys/socket.ph';
>
> # Parse command line arguments
>
> if ( $#ARGV != 3 ) {
> print STDERR "Usage: $0 ssl-proxy port destination port\n";
> print STDERR $#ARGV, "\n";
> exit(1);
> }
>
> $sslproxy = shift;
> $proxyport = shift;
> $destination = shift;
> $destport = shift;
>
> # Set up network communication
>
> ($protocol) = (getprotobyname("tcp"))[2];
> ($proxyip) = (gethostbyname($sslproxy))[4];
> $localaddr = pack('S n a4 x8', &AF_INET, 0, "\0\0\0\0");
> $proxyaddr = pack('S n a4 x8', &AF_INET, $proxyport, $proxyip);
>
> socket (PROXY, &AF_INET, &SOCK_STREAM, $protocol) or
> die("Failed to create cocket");
> bind (PROXY, $localaddr) or
> die("Failed to bind socket");
> connect (PROXY, $proxyaddr) or
> die("Failed to connect to $sslproxy port $proxyport");
>
> # Force flushing of socket buffers
>
> select (PROXY); $| = 1;
> select (STDOUT); $| = 1;
>
> # Send a "CONNECT" command to proxy:
>
> print PROXY "CONNECT $destination:$destport HTTP/1.0\r\n\r\n";
>
> # Wait for HTTP status code, bail out if you don't get back a 2xx code.
>
> $_ = <PROXY>;
> ($status) = (split())[1];
>
> die("Received a bad status code \"$status\" from proxy server")
> if ( int($status/100) != 2 );
>
> # Skip through remaining part of MIME header
>
> while(<PROXY>) {
> chomp; # Strip <LF>
> last if /^[\r]*$/; # Empty line or a single <CR> left
> }
>
> # Start copying packets in both directions.
>
> if($child = fork) { # Parent process
> while (sysread(STDIN,$_,4096)) {
> print PROXY;
> }
> sleep 2;
> kill(15,$child) if $child;
> }
>
> else { # Child process
> while (sysread(PROXY,$_,4096)) {
> print STDOUT;
> }
> }
--
_______________________________
XEROX CORPORATION
David J. Yates
System Engineer
USCO/IM Commerce Team
1350 Jefferson Road
Mailstop 13B
Rochester NY 14623
Email: [EMAIL PROTECTED]
Phone: (716) 427-1980 (x71980)
Fax: (716) 427-3761
_______________________________