LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-02-2009, 04:23 PM   #1
Pengoo
LQ Newbie
 
Registered: Jun 2009
Posts: 14

Rep: Reputation: 0
Question SSH Proxy Server


I've been flopping around for past day, trying to figure it out myself and i guess i need some help...

My desired setup:

User uses Putty to ssh to the Debian server and logs in with user/password.
putty tunnels port 443 so i can connect to the socks5 server via the ssh secure connection.

Debian Server has OpenSSH, Webmin & squid

Client -> (Putty SSH [443 tunnel]) -> Server (Proxy) -> Inet

Now Id like only authenticated users who've connected to the server via putty ssh allowed access to the socks5 server proxy.

I think I got the client part waxed, but server part im a bit lost.

Any help/pointers would be extremely helpful
 
Old 06-02-2009, 04:49 PM   #2
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Quote:
Originally Posted by Pengoo View Post
Now Id like only authenticated users who've connected to the server via putty ssh allowed access to the socks5 server proxy.
I did a similar thing to set $PS1 to a specific thing if logging in via ssh, I tested whether $SSH_TTY existed; if it did, the user has SSH'd in.

That may be a good jumping off point for you
 
Old 06-02-2009, 04:55 PM   #3
Pengoo
LQ Newbie
 
Registered: Jun 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks, as i am a web developer on vbscript side, i think i understand what your saying, nut not how to impliment.

What comes to mind is that one must probably have a script that on login, check $SSH_TTY.

Ill have to google and see what comes up under scripts.

P
 
Old 06-02-2009, 05:03 PM   #4
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Isn't that what objShell.exec does in vbscript? Of course, stick something like the following in .bashrc

Code:
if ((wc $SSH_TTY)); then 
    touch ssh_exist
fi
and have a script remove it at logout/ garbage collection. Then read the file in vbscript, and catch the file exception. This is, to be honest, the way you probably shouldn't do it- but in a purely bash solution...

Last edited by jamescondron; 06-02-2009 at 05:05 PM. Reason: Hit save too early
 
Old 06-02-2009, 06:21 PM   #5
Pengoo
LQ Newbie
 
Registered: Jun 2009
Posts: 14

Original Poster
Rep: Reputation: 0
hehe, just mentioned i have some programming experiance... not that im using vbscript here.

Just pure linux and the above mentioned progs...

My next step is to get the proxy working along with only allowing the ssh connected users.. so there your $SSH_TTY will probably come in ...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh server proxy teayourself Linux - Newbie 3 05-07-2008 02:46 AM
how to use ssh to make a proxy server joe2748 Linux - Networking 7 02-23-2008 12:17 PM
Accessing SSH from behind a proxy server rbkool Linux - Networking 3 08-25-2007 11:12 AM
Trying to SSH through a proxy server Scotteh Linux - Networking 10 05-31-2006 08:03 AM
how to ssh to Linux server via Win2K proxy wkuk Linux - Networking 2 04-23-2003 06:03 PM


All times are GMT -5. The time now is 10:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration