Re: endless problems with SSHD - bug ??

2010-08-31 Thread Larry Hall (Cygwin)

On 8/18/2010 11:24 PM, Bob Goldberg wrote:

-Original Message-
From: cygwin-owner


http://cygwin.com/acronyms/#PCYMTNQREAIYR  We don't encourage feeding the
spammers around here.  Thanks.


Sent: Wednesday, August 18, 2010 1:04 PM
To: cygwin

  ^^
Ditto.  And actually all these header fields are unnecessary.


snip



and as I finish this - just had a h...
having cygwin installed on non- C: isn't a problem - is it??


No but this may be relevant:

http://www.cygwin.com/ml/cygwin/2009-12/msg01052.html

Make sure you read the whole thread.

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.

Q: Are you sure?

A: Because it reverses the logical flow of conversation.

Q: Why is top posting annoying in email?


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: endless problems with SSHD - bug ??

2010-08-18 Thread Bob Goldberg
On 8/17/2010 Larry Hall wrote:
On 8/17/2010 5:28 PM, Bob Goldberg wrote: 


I simply want to copy files from 1 pc to another using a script initiated
by
either a user or cron entry. Ideally this would happen using scp into a
chroot'ed environment.

chroot on Cygwin is completely faked.  Don't use it.  It will cause
headaches.


As for your problem with ssh command, you've apparently missed this
appropriately titled tidbit in your googling:

http://www.cygwin.com/ml/cygwin/2000-07/msg01050.html


This may just be because you're trying to use 'rbash' as your login shell.
I didn't test that theory.


Larry - Tx much for your reply...

well even if chroot is faked (not sure what that means) - I might still be
inclined to use it...

Unless - is there a way I can LIMIT activity to only scp?
AND - prevent accessing outside what would be my jail?

I certainly did miss that very well titled document - no wonder my searches
were fruitless!! :-)  I'll check to make sure the path is getting set
correctly. Although, if I get scp running like I want, then I no longer
need/care about resolving this problem

TIA - Bob

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: endless problems with SSHD - bug ??

2010-08-18 Thread Larry Hall (Cygwin)

On 8/18/2010 1:27 PM, Bob Goldberg wrote:

Larry - Tx much for your reply...

well even if chroot is faked (not sure what that means) - I might still be
inclined to use it...


fake == it does nothing.  chroot is barely more than an empty shell (no pun
intended).  You won't find anyone seriously recommending its use.


Unless - is there a way I can LIMIT activity to only scp?
AND - prevent accessing outside what would be my jail?

I certainly did miss that very well titled document - no wonder my searches
were fruitless!! :-)  I'll check to make sure the path is getting set
correctly. Although, if I get scp running like I want, then I no longer
need/care about resolving this problem


If you need to restrict access, your best bet is to use Windows permissions.

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.

Q: Are you sure?

A: Because it reverses the logical flow of conversation.

Q: Why is top posting annoying in email?


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



RE: endless problems with SSHD - bug ??

2010-08-18 Thread Bob Goldberg
-Original Message-
From: cygwin-ow...@cygwin.com [mailto:cygwin-ow...@cygwin.com]on Behalf
Of Larry Hall (Cygwin)
Sent: Wednesday, August 18, 2010 1:04 PM
To: cygwin@cygwin.com
Subject: Re: endless problems with SSHD - bug ??


On 8/18/2010 1:27 PM, Bob Goldberg wrote:
 Unless - is there a way I can LIMIT activity to only scp?
 AND - prevent accessing outside what would be my jail?

 I certainly did miss that very well titled document - no wonder my
searches
 were fruitless!! :-)  I'll check to make sure the path is getting set
 correctly. Although, if I get scp running like I want, then I no longer
 need/care about resolving this problem

If you need to restrict access, your best bet is to use Windows permissions.
=

OK Larry, 'nuf said on the sshd chroot :o)

permissions - no problem - got that covered already

STILL - can NOT get scp to work to save my life.
AFAIK - path DOES look good according to debug info.

i've changed my shell back to /bin/bash to eliminate that variable.
relevant reminders:
  using cygwin 1.7.6 on win2k; using RSA-keys for auth
  $ ssh a...@cappy # WORKS GREAT (no typing - RSA auth works)
  $ ssh a...@cappy echo hello   # fails in same manner as scp below
and so my scp command continues to give:
 BEGIN screen dump
$ scp puttest.txt a...@cappy:~/
debug1: permanently_set_uid: 3945/514
debug3: Copy environment: ALLUSERSPROFILE=C:\\Documents and Settings\\All
Users
debug3: Copy environment: COMPUTERNAME=CAPPY
debug3: Copy environment: COMSPEC=C:\\WINNT\\system32\\cmd.exe
debug3: Copy environment: OS=Windows_NT
debug3: Copy environment:
PATH=/cygdrive/c/WINNT/system32:/cygdrive/c/WINNT:/cyg
drive/c/WINNT/System32/Wbem:/cygdrive/c/Program
Files/Symantec/pcAnywhere/:/bin
debug3: Copy environment:
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.W
SH
debug3: Copy environment: SYSTEMDRIVE=C:
debug3: Copy environment: SYSTEMROOT=C:\\WINNT
debug3: Copy environment: WINDIR=C:\\WINNT
debug3: Copy environment: CYGWIN=ntsec
getsockname failed: Socket operation on non-socket
getsockname failed: Socket operation on non-socket
Environment:
  ALLUSERSPROFILE=C:\Documents and Settings\All Users
  COMPUTERNAME=CAPPY
  COMSPEC=C:\WINNT\system32\cmd.exe
  OS=Windows_NT
 
PATH=/cygdrive/c/WINNT/system32:/cygdrive/c/WINNT:/cygdrive/c/WINNT/System32
/W
bem:/cygdrive/c/Program Files/Symantec/pcAnywhere/:/bin
  PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
  SYSTEMDRIVE=C:
  SYSTEMROOT=C:\WINNT
  WINDIR=C:\WINNT
  CYGWIN=ntsec
  USER=als
  LOGNAME=als
  HOME=/home/chroot/home/als
  MAIL=/var/spool/mail/als
  SHELL=/bin/bash
  SSH_CLIENT=192.168.1.156 3824 0
  SSH_CONNECTION=192.168.1.156 3824 UNKNOWN 0
debug3: channel 0: close_fds r -1 w -1 e -1
   1096 [main] sshd 1960 E:\cygwin\usr\sbin\sshd.exe: *** fatal error -
could no
t load user32, Win32 error 1114
Stack trace:
Frame Function  Args
00229E84  61004ADB  (61177840, 8000, , 61178977)
0022AEB4  61004ADB  (61178084, 61161E4C, 61161E4C, 0022AFA0)
0022AEE4  61001325  (61030A0B, 6123D224, 0022AF50, 0022AF18)
0022BBC8  6115764C  (0003, , , 61117A22)
0022BC08  610CADE3  (0003, 006BBAC8, 0022BD0C, 006C2998)
0022BC28  6102952B  (006BBAC8, 0022BD0C, 006C2998, 6115F410)
0022C148  610BFEA5  (006BB1F8, 0069B2C0, 0002, 0001)
0022C198  00412D4B  (006BB1F8, 0069B2C0, 006BB1F8, 00427EA2)
0022C1C8  004130F4  (006BB1F8, 0069B2C0, 006BF218, 006B290C)
0022C288  0041343C  (006BF258, 006BF218, 006BF218, 0001)
0022C2C8  0040AAF3  (0062, 000A, 006BCC38, 0040BB05)
0022C308  004389D6  (0001, , 006BCC38, 0040C6FA)
0022C348  0040BC6A  (006C2D48, 006BBA30, 0022C388, 00417DF6)
0022C388  00413CCE  (006C2D48, 0003, , 0022CC44)
0022CD58  004040F3  (, , 0022CD98, 61006C53)
0022CD98  61006C53  (, 0022CDD4, 610064F0, 7FFDF000)
End of stack trace (more stack frames may be present)
lost connection
 END screen dump

and as I finish this - just had a h...
having cygwin installed on non- C: isn't a problem - is it??

TIA (again :)

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



endless problems with SSHD - bug ??

2010-08-17 Thread Bob Goldberg
running cygwin 1.7.6; trying to copy files from a win2k wkstn to a win2k
server.
running within a windows domain; but not using domain for authentication;
using public keys.

I have read every bit of content I can find, and can't find any answers to
my problems. I:
1) HAVE installed sshd with the host-config script
2) rebaseall  peflagsall after last install/update
3) have checked EVERY entry in any conf file I can think of/locate

Maybe I should start with what I want, and where I'm at. It's the pursuit of
what I want that has led me down DOZENS of tangential problematic paths.

I simply want to copy files from 1 pc to another using a script initiated by
either a user or cron entry. Ideally this would happen using scp into a
chroot'ed environment.

I currently have sshd working perfectly - IF I ONLY ssh to a shell. pub
key's work great, no need to type a password - lovely!!  Things start
falling apart as soon as I try to do anything moving toward my goal.

first off, I have not been able to get the chroot env to work, and I can
find no doc's or examples on EXACTLY what should be the entry for that line
in the conf file (or what permissions should be).

failing that - I decided to get scp or sftp going. if I try $ sftp
u...@host, I am simply presented with connection closed. Here's the log
from that attempt:
 BEGIN LOG excerpt
debug2: userauth_pubkey: authenticated 1 pkalg ssh-rsa
Accepted publickey for als from 192.168.1.156 port 4898 ssh2
debug1: monitor_child_preauth: als has been authenticated by privileged
process
debug1: Entering interactive session for SSH2.
debug1: server_init_dispatch_20
debug1: server_input_channel_open: ctype session rchan 0 win 2097152 max
32768
debug1: input_session_request
debug1: channel 0: new [server-session]
debug1: session_new: session 0
debug1: session_open: channel 0
debug1: session_open: session 0: link with channel 0
debug1: server_input_channel_open: confirm session
debug1: server_input_global_request: rtype no-more-sessi...@openssh.com
want_rep
ly 0
debug1: server_input_channel_req: channel 0 request subsystem reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req subsystem
subsystem request for sftp
debug1: subsystem: exec() /usr/sbin/sftp-server -l DEBUG
debug2: fd 3 setting TCP_NODELAY
debug2: fd 8 setting O_NONBLOCK
debug2: fd 7 setting O_NONBLOCK
debug1: Received SIGCHLD.
debug1: session_by_pid: pid 1540
debug1: session_exit_message: session 0 channel 0 pid 1540
debug2: channel 0: request exit-signal confirm 0
debug1: session_exit_message: release channel 0
debug2: channel 0: write failed
debug2: channel 0: close_write
debug2: channel 0: send eow
debug2: channel 0: output open - closed
debug2: notify_done: reading
debug2: channel 0: read=0 rfd 8 len 0
debug2: channel 0: read failed
debug2: channel 0: close_read
debug2: channel 0: input open - drain
debug2: channel 0: ibuf empty
debug2: channel 0: send eof
debug2: channel 0: input drain - closed
debug2: channel 0: send close
debug2: channel 0: rcvd close
Received disconnect from 192.168.1.156: 11: disconnected by user
debug1: do_cleanup
 END log

I read an article saying maybe my motd is causing sftp to fail, so I removed
it to no avail. Next, I tried:
$ ssh u...@host /usr/bin/true  
bam - here's an excerpt from that log: (SAME err even if /bin/bash is shell)
 BEGIN log
  SHELL=/bin/rbash
  SSH_CLIENT=192.168.1.156 4653 0
  SSH_CONNECTION=192.168.1.156 4653 UNKNOWN 0
   2179 [main] sshd 1532 E:\cygwin\usr\sbin\sshd.exe: *** fatal error -
could no
t load user32, Win32 error 1114
 END log

I checked in winerror.h and find that err 1114 is a dll init error. so I'm
guessing this is some bug ?

I'd appreciate any insite that could get me scp'g into a chroot!!

TIA - Bob

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: endless problems with SSHD - bug ??

2010-08-17 Thread Larry Hall (Cygwin)

On 8/17/2010 5:28 PM, Bob Goldberg wrote:

running cygwin 1.7.6; trying to copy files from a win2k wkstn to a win2k
server.
running within a windows domain; but not using domain for authentication;
using public keys.

I have read every bit of content I can find, and can't find any answers to
my problems. I:
1) HAVE installed sshd with the host-config script
2) rebaseall  peflagsall after last install/update
3) have checked EVERY entry in any conf file I can think of/locate

Maybe I should start with what I want, and where I'm at. It's the pursuit of
what I want that has led me down DOZENS of tangential problematic paths.

I simply want to copy files from 1 pc to another using a script initiated by
either a user or cron entry. Ideally this would happen using scp into a
chroot'ed environment.


chroot on Cygwin is completely faked.  Don't use it.  It will cause
headaches.

As for your problem with ssh command, you've apparently missed this
appropriately titled tidbit in your googling:

http://www.cygwin.com/ml/cygwin/2000-07/msg01050.html

This may just be because you're trying to use 'rbash' as your login shell.
I didn't test that theory.

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.

Q: Are you sure?

A: Because it reverses the logical flow of conversation.

Q: Why is top posting annoying in email?


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple