Windows login script for certain users to be in certain directory after ssh login & permission for directory access
Posted on 2011-09-18
I sent my Linux .pub ssh key to a remote Windows Openssh server
administrator & this enabled me to ssh login to the remote Windows
server's command prompt (without being prompted for password).
Thing is currently all my ftp scripts' default directory after ftp login is d:\ftp\
(as set by the ftp server software on the remote-end Windows server).
But when I ssh into the server, the default directory is d:\Exchange.
However, with conversion to sftp/scp, I found the home directory
is different & this requires my sftp/scp scripts to specify the full
path. The home directory setting for the login id can't be changed
as Openssh expects to look for the ssh key in %HOMEPATH%\.ssh
& if it's changed it will affect other ssh users' public keys stored
in the Windows server. So is there a script in Windows such that
after I ssh (or scp/sftp) into the remote Windows server, it will
automatically put in the desired directory ie d:\ftp
I'm able to scp/sftp files from my Linux box to the remote Windows
server's d:\ftp\... folder. However, if I were to ssh into it, I can't
read nor list files there :
# ssh remote_id@Windows_IP_addr
Access is denied.
What needs to be done to enable the ssh login to be able to list, read &
write files there?