I have installed Cygwin with Apache, PHP, Mercurial, MYSQL, OpenSSH, PYTHON
I have updated sshd_config to chroot jail to access user-defined folders
example:
Match group sftp_users
ChrootDirectory /home/%u
SSH / SFTP works fine as I wanted.
After my connection to SSH, I get bash. There if I want to run any command like 'dir, hg, mysql, whatever
' I simply get command not found
googling for days I tried below steps
- copying all files from
C:/cygwin/bin
to 'C:/cygwin/home/username/bin' and similarlydev,etc,lib,sbin,tmp,usr,var
- this actually gives me different error something likeerror while loading shared libraries
- I tried updating on
fstab
likeC:/cygwin/bin /bin ntfs binary 0 0
even that didn't make any change in my SSH connection command - I tried adding path while making the SSH connection like
plink.exe ssh -pw xxx username@hostname -v C:/cygwin/bin/python
and I also triedplink.exe ssh -pw xxx username@hostname -v ../bin/python
- If I change
sshd_config
to its default, somehow the command works but I get wired output similar to the image below
help me this could save my life.