LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 03: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, 03:49 PM   #2
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 70
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, 03: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, 04:03 PM   #4
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 70
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 04:05 PM. Reason: Hit save too early
 
Old 06-02-2009, 05: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 01:46 AM
how to use ssh to make a proxy server joe2748 Linux - Networking 7 02-23-2008 11:17 AM
Accessing SSH from behind a proxy server rbkool Linux - Networking 3 08-25-2007 10:12 AM
Trying to SSH through a proxy server Scotteh Linux - Networking 10 05-31-2006 07:03 AM
how to ssh to Linux server via Win2K proxy wkuk Linux - Networking 2 04-23-2003 05:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:18 PM.

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
Open Source Consulting | Domain Registration