login about faq

I have a version 6 server running on Windows 2003R2 Server. I have no problems logging in and transferring files. My problem is in listing existing contents. I'm using the Tamir.SharpSsh.SshExec and creating a valid connection. I tell it to run "ls -F /admin/.[aA][cC][tT]", and initially I get back 'ls is not recognized as an internal or external command'. Ok, fine, I remembered having a similar problem with OpenSSH, the command was not there. I went to my OpenSSH installation and gathered the ls.exe and the associated dlls. I placed these in the SSH Tectia Server and added 'ls' to the commands. <command action="allow" application="C:/Program Files/SSH Communications Security/SSH Tectia/SSH Tectia Server/ls.exe" interactive="no"/>
With that, no more 'is not recognized' errors. But, I get an error in the Event Log indicating... 420 Session_channel_open, Username: Administrator, Error: Denied by policy, Command: ls -F /admin/
.[aA][cC][tT], Sub ID: 0, Session-Id: 10 ... and can find no information where to look to correct the 'Denied by policy' problem. There is only one user on the machine, Administrator, and that is who I am logging into SSh with.

Anyone run into this sort of problem when trying to use an 'exec' session ?

asked Jun 29 '11 at 19:51

rdonaldson's gravatar image

rdonaldson
11114


Well, silly me. I was trying to be to exacting in what I saw. In despiration, at some point I'd copied the ls.exe (and it's required dlls ) into the SSH Tectia\SSH Tectia AUX\Support binaries folder. I suspect that was due to seeing it in the path, and grasping at straws. But, I had left it listed on the Commands tab. While trying to debug things farther, I created a very simple client side that would let me manually enter commands. Command still failed, and log showed same error. At some point I set the Commands back to Allow, which removed my specific command from the config file. Lo and behold, the ls command started working. Went back to testing with my automated client and it worked up to the point of trying to delete a file. Ah, ha, no 'rm'.exe. Copied it into the Support binaries folder and now I'm 100%. So the real answer to my question is to leave Commands set to 'Allow' and place the necessary binaries in the right place. Thanks to those who looked.

link

answered Jun 30 '11 at 22:19

rdonaldson's gravatar image

rdonaldson
11114

edited Jun 30 '11 at 22:58

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×4
×3
×3

Asked: Jun 29 '11 at 19:51

Seen: 3,696 times

Last updated: Jun 30 '11 at 22:58

All user contributed content licensed under the cc-by-sa license.
Powered by OSQA.