LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   env variable for proxy: syntax (https://www.linuxquestions.org/questions/linux-networking-3/env-variable-for-proxy-syntax-342234/)

FrayAdjacent 07-11-2005 04:00 PM

Proxytunnel issues
 
So I'm trying to set the environment variable for a proxy, since everything from work has to go through a proxy.

so I've tried

#export http_proxy=http://username:password@proxy.company.com:80

When I run env, it lists the line above (sans 'export'), but when I try to do anything that would have to go through the proxy (ssh to an external host), it times out.

Is the syntax above correct for setting the proxy variable?

mhallbiai 07-11-2005 06:41 PM

looks correct to me

if you are trying to use proxytunnel for ssh it will need to be in a config file (not sure of the name)

~/.ssh/something

when i get to work i will check my config and provide an update on the structure and name of the file

hope this helps

FrayAdjacent 07-11-2005 07:04 PM

I downloaded proxytunnel, but the packaging isn't very intuitive... there's no make file, no config file... I have no idea how to install it.

I was just hoping that SSH would go through a proxy if the proxy was set in an environment variable. A couple of my linux gurus here confer that it should work, I just wanted to be sure the syntax of the export command was correct.

If anyone has any pointers on how to install proxytunnel in FC3/4, let me know!

mhallbiai 07-11-2005 07:46 PM

as far as installing it, navigate into the proxytunnel directory where you extracted it and run

Code:

make
make install

here is the structure of the file: ~/.ssh/config
Code:

Host myexternalbox
ProxyCommand /usr/local/bin/proxytunnel -g proxy.company.com -G 80 -u username -p password -d mybox.athome.com -D 443

then to connect you would initiate ssh as such
Code:

ssh -l HomeBoxUsername myexternalbox
the key here is to connect with whatever you named it on the "host" line and make sure that the proxytunnel command option for -d will resolve to your box

[NOTE: proxytunnel installed to /usr/local/bin/proxytunnel in my config, make sure you specify the correct path to your installation. 'which proxytunnel' should give you the location]

hope this helps

FrayAdjacent 07-11-2005 08:51 PM

Ok, I downloaded the tgz file and extracted it.

When I 'make', I get

make: gcc: Command not found
make: *** [proxytunnel.o] Error 127

and when I try make install I get:

mkdir -p /usr/local/bin
install -g root -m755 -o root proxytunnel /usr/local/bin/proxytunnel
install: cannot stat 'proxytunnel': No such file or directory
make: *** [install] Error 1


The files are extracted to a folder in my user's home directory, and I am running make and make install as root.

Does the tar.gz file need to be extracted somewhere else and then make/make install?

mhallbiai 07-11-2005 10:58 PM

sounds like you are missing gcc (and probably some other development/libraries)
/usr/bin/gcc ?
rpm -qa | grep gcc
on one of my boxes gcc-3.4.2-6.fc3 provides /usr/bin/gcc (version may be different for you)

'make install' is failing because 'make' did not successfully build the proxytunnel binary so that's where the "cannot stat 'proxytunnel'" message is coming from

if you want i can email you the binary, should work for you. i have copied it from one of my other boxes to a third box and had it work. otherwise you will need to track down the necessary packages to get it to build

i have email enabled in my profile so let me know


hope this helps

FrayAdjacent 07-12-2005 11:29 AM

mhallbiai, I sent you a pm. I appreciate the input! I'm a bit past the 'complete noob' stage to 'have some experience', but there is just so much to Linux, one can keep learning!

When you email me the binary, do I just drop that into /usr/bin/ or should I put it in the folder and then use make install to install it correctly?

mhallbiai 07-12-2005 04:21 PM

what i did was extract the contents, changed into the directory, ran make, then tar'd the file up again including the binary, you should be able to run 'make install' and it will install the binary as well as the man pages

hope this helps

FrayAdjacent 07-13-2005 01:40 PM

It looks like it installed everything except the man pages, but I know where they are! I'll be trying it shortly :)

FrayAdjacent 07-13-2005 02:21 PM

argh! It's fighting me tooth and nail

When I execute ssh -l matt ip.of.home.box
I get:

/bin/sh: /home/matt/: is a directory
/bin/sh: line 0: exec: /home/matt/: cannot execute: Success
ssh_exchange_indentification: Connection closed by remote host

FrayAdjacent 07-13-2005 05:44 PM

ok, I figured it out... I had my ~.ssh/config set to the wrong location.

I am now connected to my box at home, and can launch X applications and display them locally.

Thanks for all the help! It was instrumental! THIS is why I love Linux!


All times are GMT -5. The time now is 12:15 PM.