Re: dynamically configuring ssh ip address

2007-04-16 Thread Ilya Konstantinov
On 4/15/07, Maxim Veksler [EMAIL PROTECTED] wrote: On 4/15/07, Ehud Karni [EMAIL PROTECTED] wrote: On Sat, 14 Apr 2007 16:18:20 +1000, Amos Shapira wrote: That said, I'm not sure that I can trust SSH_CLIENT/SSH_CONNECTION since they are passed from the client. Maybe a getpeername(2) on

Re: dynamically configuring ssh ip address

2007-04-16 Thread Amos Shapira
On 16/04/07, Ilya Konstantinov [EMAIL PROTECTED] wrote: Just when did this list go crazy? There's a solution fitting your problem - dynamic DNS (with DNSSEC). Why hack something when any modern DNS server supports it through configuration? When not having access to the DNS server to enable

Re: dynamically configuring ssh ip address

2007-04-16 Thread Ilya Konstantinov
On 4/16/07, Amos Shapira [EMAIL PROTECTED] wrote: On 16/04/07, Ilya Konstantinov [EMAIL PROTECTED] wrote: Just when did this list go crazy? There's a solution fitting your problem - dynamic DNS (with DNSSEC). Why hack something when any modern DNS server supports it through configuration?

Re: dynamically configuring ssh ip address

2007-04-15 Thread Ehud Karni
On Fri, 13 Apr 2007 21:51:59 +1000, Amos Shapira wrote: Also, my question was less about how to get the data - ssh with a special identiy and a limited command looks easier and more secure - but more on how to get the ip address used by the ssh client at work. It is very VERY simple, just

Re: dynamically configuring ssh ip address

2007-04-15 Thread Ehud Karni
On Sat, 14 Apr 2007 16:18:20 +1000, Amos Shapira wrote: That said, I'm not sure that I can trust SSH_CLIENT/SSH_CONNECTION since they are passed from the client. Maybe a getpeername(2) on stdin/stdout can be used as a more secure way to obtain the client's IP. You are mistaken. You can trust

Re: dynamically configuring ssh ip address

2007-04-15 Thread Maxim Veksler
On 4/15/07, Ehud Karni [EMAIL PROTECTED] wrote: On Sat, 14 Apr 2007 16:18:20 +1000, Amos Shapira wrote: That said, I'm not sure that I can trust SSH_CLIENT/SSH_CONNECTION since they are passed from the client. Maybe a getpeername(2) on stdin/stdout can be used as a more secure way to obtain

Re: dynamically configuring ssh ip address

2007-04-15 Thread Amos Shapira
On 16/04/07, Maxim Veksler [EMAIL PROTECTED] wrote: Yes, I was thinking about this one. Assuming you do get SSH_CLIENT passed to you by the client that connects, the fact he is passing your anything means the client has already passed the authentication phase! I would say that if it was a rouge

Re: dynamically configuring ssh ip address

2007-04-14 Thread Amos Shapira
On 14/04/07, Maxim Veksler [EMAIL PROTECTED] wrote: I assume you are aware of the way you run commands on the server with ssh. Example for those who don't: [EMAIL PROTECTED]:/$ ssh localhost echo ssh-server-side: \$SSH_CLIENT ssh-server-side: 127.0.0.1 45116 22 [EMAIL PROTECTED]:/$

Re: dynamically configuring ssh ip address

2007-04-13 Thread Ilya Konstantinov
On 4/13/07, Amos Shapira [EMAIL PROTECTED] wrote: Is this the only way to do this? Is there a more elegant way I'm missing? Yes, subscribe to yet another dynamic IP name service for the work IP. If your sysadmin at work is nice enough and you have an internal DNS server, you could pretty

Re: dynamically configuring ssh ip address

2007-04-13 Thread Amos Shapira
On 13/04/07, Ilya Konstantinov [EMAIL PROTECTED] wrote: On 4/13/07, Amos Shapira [EMAIL PROTECTED] wrote: Is this the only way to do this? Is there a more elegant way I'm missing? Yes, subscribe to yet another dynamic IP name service for the work IP. If your sysadmin at work is nice enough

Re: dynamically configuring ssh ip address

2007-04-13 Thread Yehoshua (Shay) O'Hayon Suchar
Amos Shapira wrote: On 13/04/07, *Moshe Leibovitch* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: It may sound too simplistic, but you can mail it to a shell alias which will run a script. Thanks for the idea, but I can only access mail at work through Outlook. Can't you

Re: dynamically configuring ssh ip address

2007-04-13 Thread Ilya Konstantinov
On 4/13/07, Amos Shapira [EMAIL PROTECTED] wrote: (We currently use MS VPN, maybe once I get around to switch to OpenVPN I'll have more control over this and be able to dynamically assign host names based on the user used to login to the VPN? Is this possible with MS VPN?) This is

Re: dynamically configuring ssh ip address

2007-04-13 Thread Amos Shapira
On 13/04/07, Yehoshua (Shay) O'Hayon Suchar [EMAIL PROTECTED] wrote: Amos Shapira wrote: On 13/04/07, *Moshe Leibovitch* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: It may sound too simplistic, but you can mail it to a shell alias which will run a script. Thanks for the

Re: dynamically configuring ssh ip address

2007-04-13 Thread Maxim Veksler
On 4/14/07, Amos Shapira [EMAIL PROTECTED] wrote: On 13/04/07, Yehoshua (Shay) O'Hayon Suchar [EMAIL PROTECTED] wrote: Amos Shapira wrote: On 13/04/07, *Moshe Leibovitch* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: It may sound too simplistic, but you can mail it to a shell