views:

1966

answers:

4

hello I just set up SSHd through Cygwin on a Windows XP Pro box overseas using a RAT and discluded the openssh package from the install. I ran the cywin shell (from c:\cywin) and ran Now, It's under a port I know is safe and fowarded properly, but I won't share it's number. It's not a common port, but it's under 40000. Firewalls are off etc etc. I'm on the first Admin account made on the box. (It's full admin) I've run the following commands

chmod +r /etc/passwd
chmod +r /etc/group
hmod 777 /var
/*Created New Admin User Account To Be Used via SSH*/
mkpasswd -cl > /etc/passwd
mkgroup --local > /etc/group

I can connect locally, but not externally. I know my ports etc are fine.

Any possible problems, as i really need this tunnel up :P

A: 

Well, the big security problem I can see is that you're running Windows.

Why bother with cygwin on top of windows when you could even just run a small light vm of a linux distro?

J.D. Fitz.Gerald
I've used it when you need to exec a console application in a windows box. In my case, we use linux for desktops, but our apps are multiplatform and must be compiled in windows. The automated build process connects to a windows machine, updates the repository and launches compilation through ssh.
David Rodríguez - dribeas
A: 

Why bother posting a smart-a**, "linux is better" reply to Supernovah's question when you don't even have any suggestions for the problem?

Heh, and this should have been a comment on J.D.'s answer instead of an answer on its own.
Jacob
A: 

How about trying the following:

1) You said it works locally but ensure that the port is fine by connecting to 127.0.0.1 / localhost and that you get the "SSH handshake". For example if you use port 1234 you can run:

telnet localhost 12345

You should get something like:

SSH-2.0-OpenSSH_5.1p .....

2) Ensure the port is fine from a remote host.
Run telnet again from a remote host and see if you get the SSH prompt.

If you can do the above then you know you server is listening fine. If you still can not connect from remote, check that your signatures are ok. For example delete known_hosts(2) on your client etc.

In windows be aware that sshd will run under another "environment/shell" as from the command line or your local user account. You can setup the service to run as a specified user or as Local System Account, so ensure your "account's environment" is ok. One way to debug could be to enable local system account with Interact with Desktop enabled. You can then add the "-d" switch in the registry of with cygwin service installation tool. You can also refer to this link for some info.

I'm sure if you follow "/usr/share/doc/Cygwin/openssh.README" you should be able to get it running fine. You can also Google for this doc.

Derick
A: 

By connecting locally do you mean you tried ssh localhost? If so you may have only bound your sshd to your 127.0.0.1 interface. Check your /etc/sshd_config for the following line:

ListenAddress 0.0.0.0

Then test it by ssh-ing to the actual ip address and not localhost/127.1.

If that works then you may have a NAT or Firewall problem but the problem is no longer on Cygwin.

Marius