Ok. I read about channel and session in libssh. So, if i understood
correctly, one channel for one command. And if i change working directory
in one (like send "cd working_directory)", other channel will do not now
about my changes anything. So, if i want to do smth like this:
tar cf test.tar test.txt
i must to use the same channel.
But this way leads me to LIBSSH2_ERROR_CHANNEL_REQUEST_DENIED when call
So, what else i don't understand or don't know about libssh. And, maybe, i
try to solve problem, by using wrong way? If so, in what way i can remote
execute shell command in specified (by me) directory?
I would be very grateful for any advice.
2012/4/11 Dmitry <russiankickingbear_at_gmail.com>
> Try to send to remote server command "tar cf test.tar test_file.txt"
> As a result of this operation creates archive test.tar in folder
> /home/username. But I want to be able to execute commands not only in
> /home/username directory, but in any directory. How can I implement this
> feature? Before create archive i tried to send command like "cd /
> target_directory" But as a result archive anyway created in /home/username
Received on 2012-04-11