There is a way to run commands on login (server-side), I just forget how to
at the moment. When I get back to where I keep my documentation I will look
up the method.
By the way, I will have a "fixed" build of my installer up soon that uses
the old method of file permissions. An announcment will be sent out when it
is ready.
-Michael
-----Original Message-----
From: Mueller, Steve [mailto:smueller@a4healthsystems.com]
Sent: Friday, October 10, 2003 11:44 AM
To: 'Secure Shell Discussions'
Subject: RE: OpenSSH for windows: starting directories
You might try this:
in sshd_config -
AuthorizedKeysFile /cygdrive/c/sshkeys/%u/authorized_keys
The %u in the above is replaced with the users login id on expansion so you
can have separate key files per user.
I looked into the source code and it looks like the environment settings
have to be stored in the $HOME/.ssh/environment file. However, you can set
environment variables in each users authorized_keys file by putting the
following stuff at the beginning of the line for each key for that user you
want the settings to be in effect for:
environment="variable1=value1",environment="variable2=value2"<space>rest of
key Of course, for this to work, you need to have "PermitUserEnvironment
yes" in the sshd_config file.
Good luck.
Steve
-----Original Message-----
From: Robert Dengler [mailto:no6b@no6b.jpl.nasa.gov]
Sent: Friday, October 10, 2003 12:58 PM
To: Secure Shell Discussions
Subject: Re: OpenSSH for windows: starting directories
At 10/10/2003 02:39 AM, you wrote:
>Robert Dengler wrote:
> > I'm running the latest version of OpenSSH for Windows on NT 5.0.
> > I'd like to have the command prompt from a remote client start in a
> > specific directory (say c:\dir1, or /cygdrive/c/dir1/) while the
> > public key file is in a different directory (c:\dir2). If I change
> > the home directory in the passwd file to /cygdrive/c/dir2/, the key
> > file isn't used - I have to type in the password. I also need to
> > use switch.exe, so can't edit quietcmd.bat to put the terminal into
> > the right directory after login.
> >
> > Is there any way to have the SSH client start in a directory other
> > than the one the key file is placed? Thanks.
>certainly
>the two obvious solutions are
>a) change the location of the keyfile in the ssh_config file
>(IdentityFile
>parameter)
There is no "IdentityFile" parameter listed in the sshd_config manual. I
assume you're referring to the "AuthorizedKeysFile" parameter. This works,
but now I can't read the environment file as it's also looking for it in
the starting directory. In addition, there doesn't appear to be any way to
set the location of environment in sshd_config.
>b) edit the user's profile to include a cd to the required dir and/or
>change his $HOME to a different dir ($HOME is nothing special, its just
>an environment variable)
Same problem as above.
Bottom line: I want the starting terminal directory & the directory where
the keys, environment, etc. are located to be in two separate places that I
specify. What is the most straightforward way to accomplish this?
Bob
-- List Information: http://tech.erdelynet.com/mailman/listinfo/ssh-l/ List Archives: http://erdelynet.com/archive/ssh-l/ To Unsubscribe: Go to http://tech.erdelynet.com/mailman/listinfo/ssh-l/ and enter your email address at the bottom to "Edit Options". If you don't know your password, have it emailed to you. Then unsubscribe. This email contains confidential or proprietary information which may be legally privileged. If you are not the named recipient, you should immediately delete it from your computer system. -- List Information: http://tech.erdelynet.com/mailman/listinfo/ssh-l/ List Archives: http://erdelynet.com/archive/ssh-l/ To Unsubscribe: Go to http://tech.erdelynet.com/mailman/listinfo/ssh-l/ and enter your email address at the bottom to "Edit Options". If you don't know your password, have it emailed to you. Then unsubscribe. ########################################### This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange. For more information, connect to http://www.F-Secure.com/ -- List Information: http://tech.erdelynet.com/mailman/listinfo/ssh-l/ List Archives: http://erdelynet.com/archive/ssh-l/ To Unsubscribe: Go to http://tech.erdelynet.com/mailman/listinfo/ssh-l/ and enter your email address at the bottom to "Edit Options". If you don't know your password, have it emailed to you. Then unsubscribe.Received on Fri Oct 10 16:47:10 2003
This archive was generated by hypermail 2.1.8 : Fri Jul 29 2005 - 17:33:59 EDT