I have ssh access to other Suse box and I want to list particular directory on the suse box. It will be done from other suse box. I will run this from php later on.Is something like that possible?
Can ssh return directory list?
ssh
You can have ssh return the output of any remote command simply by sending the command as the last argument to your ssh comand:ssh user@host 'ls /path/to/dir'If you have key based authentication setup this can be done without entering a password.However parsing the output of ls is always a bad idea, and it sounds like you might have a use case for something a little fancier. There is a file system called SSHFS that allows you to mount virtually any file system that you can ssh into. You could mount the remote directory so that your php script could operate on it as if it was a set of local files and directories.