• RSS
  • Twitter
  • FaceBook

Security Forums

Log in

FAQ | Search | Usergroups | Profile | Register | RSS | Posting Guidelines | Recent Posts

Using netcat to login to a proxy and specify username/passwd

Users browsing this topic:0 Security Fans, 0 Stealth Security Fans
Registered Security Fans: None
Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> UNIX // GNU/Linux

View previous topic :: View next topic  
Author Message
jasonventresca
Just Arrived
Just Arrived


Joined: 03 Apr 2008
Posts: 0


Offline

PostPosted: Thu Apr 03, 2008 2:49 pm    Post subject: Using netcat to login to a proxy and specify username/passwd Reply with quote

I'm not sure if I'm posting this in the right area, but here it goes:
I'm behind a proxy at school and want to bypass the filters by tunneling my traffic through SSH. So I have setup an SSH server at home and set the listening port to 443. I am able to successfully connect to it from other networks, so I know that there is nothing wrong with the SSH server. However, I am unable to connect to it through the proxy at school. I've tried adding the ProxyCommand directive to my ssh_config file, but I'm not sure if it's being used correctly. The client is running Mac OS X 10.5 and here is the directive used in my ssh_config file:
ProxyCommand /usr/bin/nc -X connect -x lvapps.lvcsd.k12.ny.us:9017 %h %p
I set the ProxyCommand as above because when I try to open my browser behind the proxy, I am initially redirected to http://lvapps:9017 and asked to log in to the area "lvapps" on lvapps:9017. Additionally, I tried running this netcat command in the terminal, just to see if it would run independently of the SSH, which it should. I'm thinking the problem is that I need to specify the username and password by which to login in the netcat command, but I'm not sure how to do this, or if it is even possible. Any feedback would be greatly appreciated!
Back to top
View user's profile Send private message
jasonventresca
Just Arrived
Just Arrived


Joined: 03 Apr 2008
Posts: 0


Offline

PostPosted: Thu Apr 03, 2008 3:58 pm    Post subject: Update Reply with quote

I have been playing around with the ssh_config file some more and found a better command which supports username/password for connecting https proxy. Here is the verbose output from running the ssh command:

iBook:~ Jason$ ssh myserver -v
OpenSSH_4.7p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /Users/Jason/.ssh/config
debug1: Applying options for myserver
debug1: Reading configuration data /etc/ssh_config
debug1: Executing proxy command: exec /usr/bin/proxytunnel -p lvapps:9017 -P x:x -d myserver:443
debug1: permanently_drop_suid: 501
Via lvapps:9017 -> myserver:443
debug1: identity file /Users/Jason/.ssh/identity type -1
HTTP return code: 400 Bad Request
debug1: identity file /Users/Jason/.ssh/id_rsa type 1
debug1: identity file /Users/Jason/.ssh/id_dsa type 2
ssh_exchange_identification: Connection closed by remote host
iBook:~ Jason$

As you can see, proxytunnel seems to connect to the proxy fine, but fails when trying to establish the tunnel to the ssh server. Any ideas?
Back to top
View user's profile Send private message
Display posts from previous:   

Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> UNIX // GNU/Linux All times are GMT + 2 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Community Area

Log in | Register