[Patch] Proxy command-line argument

2008-01-20 Thread Vincent Privat
Hi,

I made a small patch to setup.exe. It adds the following command line argument:

-p --proxy HTTP/FTP proxy (host:port)

The only modified file is net.cc, which is attached to this mail.

Basically, the modifications are:
- Inclusion of sstream and getopt++/StringOption.h
- Addition of static StringOption ProxyOption (, 'p', proxy,
HTTP/FTP proxy (host:port), false);
 - Modification of NetPage::OnInit () method to modify
NetIO::net_method , NetIO::net_proxy_host and NetIO::net_proxy_port

I think my changes are conformed to the Cygwin coding guidelines and I
hope to see this patch accepted.

As it is my very first patch, I'm not sure if I must send it to this
mailing-list; or to the cygwin-patches one ?

Thanks in advance for your comments.

Vincent
/*
 * Copyright (c) 2000, Red Hat, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * A copy of the GNU General Public License can be found at
 * http://www.gnu.org/
 *
 * Written by DJ Delorie [EMAIL PROTECTED]
 *
 */

/* The purpose of this file is to get the network configuration
   information from the user. */

#if 0
static const char *cvsid =
  \n%%% $Id: net.cc,v 2.17 2005/05/04 14:52:34 maxb Exp $\n;
#endif

#include net.h

#include LogSingleton.h

#include win32.h
#include stdio.h
#include stdlib.h
#include sstream
#include dialog.h
#include resource.h
#include netio.h
#include msg.h

#include getopt++/StringOption.h
#include propsheet.h
#include threebar.h
#include ConnectionSetting.h
extern ThreeBarProgressPage Progress;

static StringOption ProxyOption (, 'p', proxy, HTTP/FTP proxy 
(host:port), false);

static int rb[] = { IDC_NET_IE5, IDC_NET_DIRECT, IDC_NET_PROXY, 0 };
static ConnectionSetting theSetting;
static bool doing_loading = false;

void
NetPage::CheckIfEnableNext ()
{
  int e = 0, p = 0, pu = 0;
  DWORD ButtonFlags = PSWIZB_BACK;

  if (NetIO::net_method == IDC_NET_IE5)
pu = 1;
  if (NetIO::net_method == IDC_NET_IE5 || NetIO::net_method == IDC_NET_DIRECT)
e = 1;
  else if (NetIO::net_method == IDC_NET_PROXY)
{
  p = pu = 1;
  if (NetIO::net_proxy_host  NetIO::net_proxy_port)
e = 1;
}
if (e)
{
// There's something in the proxy and port boxes, enable Next.
ButtonFlags |= PSWIZB_NEXT;
}

  GetOwner ()-SetButtons (ButtonFlags);

  EnableWindow (GetDlgItem (IDC_PROXY_HOST), p);
  EnableWindow (GetDlgItem (IDC_PROXY_PORT), p);
}

static void
load_dialog (HWND h)
{
  doing_loading = true;

  rbset (h, rb, NetIO::net_method);
  eset (h, IDC_PROXY_HOST, NetIO::net_proxy_host);
  if (NetIO::net_proxy_port == 0)
NetIO::net_proxy_port = 80;
  eset (h, IDC_PROXY_PORT, NetIO::net_proxy_port);

  doing_loading = false;
}

static void
save_dialog (HWND h)
{
  // Without this, save_dialog() is called in the middle of load_dialog()
  // because the window receives a message when the value changes.  If this
  // happens, save_dialog() tries to read the values of the fields, resulting
  // in the net_proxy_port being reset to zero - this is the cause of the
  // preference not sticking.
  if (doing_loading)
return;

  NetIO::net_method = rbget (h, rb);
  NetIO::net_proxy_host = eget (h, IDC_PROXY_HOST, NetIO::net_proxy_host);
  NetIO::net_proxy_port = eget (h, IDC_PROXY_PORT);
}

bool
NetPage::Create ()
{
  return PropertyPage::Create (IDD_NET);
}

void
NetPage::OnInit ()
{
  HWND h = GetHWND ();
  std::string proxyString(((std::string)ProxyOption).c_str());

  if (!NetIO::net_method)
NetIO::net_method = IDC_NET_DIRECT;

  if (proxyString.size())
  {
NetIO::net_method = IDC_NET_PROXY;

unsigned int pos = proxyString.find_last_of(':');
if (pos = 0)
{
  NetIO::net_proxy_host = strdup(proxyString.substr(0, pos).c_str());
  if (pos  proxyString.size()-1)
  {
std::string portString = proxyString.substr(pos+1, 
proxyString.size()-(pos+1));
std::istringstream iss(portString, std::istringstream::in);
iss  NetIO::net_proxy_port;
  }
}
  }

  load_dialog (h);
  CheckIfEnableNext();

  // Check to see if any radio buttons are selected. If not, select a default.
  if ((!SendMessage (GetDlgItem (IDC_NET_IE5), BM_GETCHECK, 0, 0) ==
   BST_CHECKED)
   (!SendMessage (GetDlgItem (IDC_NET_PROXY), BM_GETCHECK, 0, 0)
  == BST_CHECKED))
{
  SendMessage (GetDlgItem (IDC_NET_DIRECT), BM_CLICK, 0, 0);
}
}

long
NetPage::OnNext ()
{
  save_dialog (GetHWND ());

  log (LOG_PLAIN)  net: 
 ((NetIO::net_method == IDC_NET_IE5) ? IE5 :
(NetIO::net_method == IDC_NET_DIRECT) ? Direct : Proxy)  endLog;

  Progress.SetActivateTask (WM_APP_START_SITE_INFO_DOWNLOAD);
  return IDD_INSTATUS;
}

long
NetPage::OnUnattended()
{
  return OnNext ();
}

long

Re: [Patch] Proxy command-line argument

2008-01-20 Thread Christopher Faylor
On Mon, Jan 21, 2008 at 12:19:56AM -0500, Christopher Faylor wrote:
On Mon, Jan 21, 2008 at 02:38:35AM +0100, Vincent Privat wrote:
The only modified file is net.cc, which is attached to this mail.

Basically, the modifications are:
- Inclusion of sstream and getopt++/StringOption.h
- Addition of static StringOption ProxyOption (, 'p', proxy,
HTTP/FTP proxy (host:port), false);
 - Modification of NetPage::OnInit () method to modify
NetIO::net_method , NetIO::net_proxy_host and NetIO::net_proxy_port

I think my changes are conformed to the Cygwin coding guidelines and I
hope to see this patch accepted.

As it is my very first patch, I'm not sure if I must send it to this
mailing-list; or to the cygwin-patches one ?

Since cygwin-patches says this:

* cygwin-patches: a list for submitting patches to the Cygwin DLL and
the other components of the winsup directory (if you aren't sure what
this means, then you shouldn't be sending email here).  Discussions of
supplied patches are also acceptable, of course.  Only subscribers may
submit email to this list.

that should narrow down your choice to either this mailing list or
   the cygwin mailing list or
cygwin-apps and cygwin-apps is the correct choice.

cgf


Re: [Patch] Proxy command-line argument

2008-01-20 Thread Christopher Faylor
On Mon, Jan 21, 2008 at 02:38:35AM +0100, Vincent Privat wrote:
I made a small patch to setup.exe. It adds the following command line argument:

-p --proxy HTTP/FTP proxy (host:port)

Thanks!

The only modified file is net.cc, which is attached to this mail.

Basically, the modifications are:
- Inclusion of sstream and getopt++/StringOption.h
- Addition of static StringOption ProxyOption (, 'p', proxy,
HTTP/FTP proxy (host:port), false);
 - Modification of NetPage::OnInit () method to modify
NetIO::net_method , NetIO::net_proxy_host and NetIO::net_proxy_port

I think my changes are conformed to the Cygwin coding guidelines and I
hope to see this patch accepted.

As it is my very first patch, I'm not sure if I must send it to this
mailing-list; or to the cygwin-patches one ?

Since cygwin-patches says this:

* cygwin-patches: a list for submitting patches to the Cygwin DLL and
the other components of the winsup directory (if you aren't sure what
this means, then you shouldn't be sending email here).  Discussions of
supplied patches are also acceptable, of course.  Only subscribers may
submit email to this list.

that should narrow down your choice to either this mailing list or
cygwin-apps and cygwin-apps is the correct choice.

Thanks in advance for your comments.

Please provide this as an actual patch:

http://en.wikipedia.org/wiki/Patch_%28Unix%29

A patch is basically just a diff -du old new.  Sending the whole file makes
it hard to figure out what you've changed.

If possible, a patch against the current CVS sources is preferred.  See:

http://sourceware.org/cygwin-apps/setup.html

cgf


Re: Re: cygserver handle leak problem

2008-01-20 Thread Huang Bambo
 On Jan 18 08:58, Huang Bambo wrote:
  Use task manager to view detail of cygserver.
 
  Operations,
  I ran a program with ipc operation( I used msgget ,msgsnd, msgrcv ,
  others didn't test).
  After that, use ipcs command to show ipcs, found message que. use
  ipcrm command to remove the message que.
 
  Repeat the operations, you will find the handles owned by cygserver
  increased 2 each time.

 Could you please create a very simple testcase in plain C which
 allows to reproduce the problem OOTB?


 Thanks,
 Corinna

The attchment is my cygcheck --sysinfo's output and a sample program.
The sample program just use message que of SysV to translate some information.
It is write in C++ so you need gmake and g++ installed to make it. If
you want a C code, reply this mail and I will write one for you.

Once run, just use Ctrl+C to end it.

To duplicate the problem,
1. Run windows task manager , show handles of cygserver.
2. Run my program, it will create a message que, you will find the
cygserver process's handle increased by 4
3. Run ipcs command, you will find the que.
4. Run ipcrm command to remove this command, you will find the
cygserver's handles will only decrease by 2
5, go to 2 ,repeat the operation, you will find the handles owned by
cygserver will only increase.


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

Re: ssh interactive shell not working

2008-01-20 Thread Roger Wells

FWIW,
I seem to be having the same problem.  Last week I reinstalled Windows 
XP, SP2  Cygwin.  Since then I can't ssh into my Windows box.  I also 
observed the:


debug2: channel 0: rcvd eof



but haven't had the chance to track it down.  Prior to the 
re-installation exercise it was perfect for at least the last couple of 
years.  Needless to say I am watching this thread with interest.  Let me 
know if I can send anything along.


but haven't had the chance to track it down.  Needless to say I am watching 
this thread with interest.

Kyle A. Dawson wrote:

That command does not work

$ ssh -v -v -v -v -v myhost --login -i -x
OpenSSH_4.7p1, OpenSSL 0.9.8g 19 Oct 2007
ssh: unknown option -- -
usage: ssh [-1246AaCfgKkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]
   [-D [bind_address:]port] [-e escape_char] [-F configfile]
   [-i identity_file] [-L [bind_address:]port:host:hostport]
   [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
   [-R [bind_address:]port:host:hostport] [-S ctl_path]
   [-w local_tun[:remote_tun]] [EMAIL PROTECTED] [command]


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Dave Korn
Sent: Friday, January 18, 2008 8:45 AM
To: cygwin@cygwin.com
Subject: RE: RE: ssh interactive shell not working

On 18 January 2008 14:07, Kyle A. Dawson wrote:

  

Ok, here is the output from the debug

$ ssh -v -v -v -v -v myhost

OpenSSH_4.7p1, OpenSSL 0.9.8g 19 Oct 2007
debug2: ssh_connect: needpriv 0



  Doh.  Sorry, my fault - that doesn't really show us enough, although it
does
show...


  

debug3: tty_make_modes: 93 0
debug2: channel 0: request shell confirm 0
debug2: fd 3 setting TCP_NODELAY
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 2097152



  ^^ that at this point, you were successfully connected, and ...

  

debug2: channel 0: rcvd eof



  ^^^ immediately afterward the other end sent an EOF and closed the
channel,
for no obvious reason.


  

The client has not changed at all and worked before, I have many clients
that were working, now all stopped.  So I think it is on the server side.



  Agreed, it's the startup scripts on the server side I was talking about,
but
my commandline didn't turn on bash debugging as well as ssh debugging.

  Please try again with:

$ ssh -v -v -v -v -v myhost bash --login -i -x

and we should see your bash startup scripts running in the debug output.

cheers,
  DaveK
  


--
Roger Wells, P.E.
SAIC
221 Third St
Newport, RI 02840
401-847-4210 (voice)
401-849-1585 (fax)
[EMAIL PROTECTED]


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



RE: ssh interactive shell not working

2008-01-20 Thread Kyle A. Dawson

Also whie on the server, if I login into the server to the host name, 
myhost.com ( the public internet name) it works as well.


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



RE: ssh interactive shell not working

2008-01-20 Thread Kyle A. Dawson
1) I do not know of any other bash installed at all.
2) If I ssh to localhost,it works fine.  ssh localhost. I get a prompt fine.
3) If I leave out the --login It works but I get a different prompt
$ ssh myhost bash -i
bash-3.2$
If I leave out the -k, I get no prompt but I am in, I can run commands, etc.


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



RE: ssh interactive shell not working

2008-01-20 Thread Kyle A. Dawson
 If I leave out the -k, I get no prompt but I am in, I can run commands, 
 etc.


I was meaning the -i

I search the entire computer and only found the one bash.exe, in the existing 
cygwin home

Here are my cases:

1) If am on the ssh server itself, all works fine, I can logon via ssh 
localhost or ssh myhost. Get prompt and all looks good.
2) If I logon to the ssh server from any other machine with bash -i, ssh 
myhost bash -i, all works fine, I get a prompt and can run commands
3) If I logon to the ssh server from any other machine the normal was, ssh 
myhost, it closes connections right away
4) If I logon to the ssh server from any other machine to just run a command, 
it works fine.  The command runs on ssh server and shell comes back  
ssh myhost ls -lart
  ssh myhost hostname
5) If I logon to ssh server from another computer behind the router, some 
subnet as server, using the server private ipaddress, 192.168.1.125, still get 
same issue.  So it is not a router issue.


It appears the issue is something to do with running the bash shell by default, 
it just does not for some reason.  I thought something was messed up with the 
cygwin config/install, so I deleted the dir and installed from scratch.  But I 
get the same errors.





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



Re: ssh interactive shell not working

2008-01-20 Thread Larry Hall (Cygwin)

Kyle A. Dawson wrote:

Also whie on the server, if I login into the server to the host name,
myhost.com ( the public internet name) it works as well.



I think you're going to have to enumerate the cases that cause you problems
and those that don't in a clear list so it's obvious to the list what you've
tried, what doesn't work, and what does.  I admit I've lost track with all
the piecemeal reports and, in come cases, the missing context.


--
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?

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



Re: ssh interactive shell not working

2008-01-20 Thread Larry Hall (Cygwin)

Roger Wells wrote:

FWIW,
I seem to be having the same problem.  Last week I reinstalled Windows 
XP, SP2  Cygwin.  Since then I can't ssh into my Windows box.  I also 
observed the:


debug2: channel 0: rcvd eof



but haven't had the chance to track it down.  Prior to the 
re-installation exercise it was perfect for at least the last couple of 
years.  Needless to say I am watching this thread with interest.  Let me 
know if I can send anything along.


This is called a me-too. ;-)  If you find something of worth, please let
the list know.  Also, FWIW, the thread has moved well beyond the point
where you responded, in case you missed the messages that followed.

--
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?

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



Re: ssh interactive shell not working

2008-01-20 Thread Larry Hall (Cygwin)

I should say that this list discourages the quoting of email addresses in
replies (we don't like people feeding others email addresses to the
spammers) or top-posting.  I've sanitized and reformatted the thread below:

Kyle A. Dawson wrote:

-Original Message-
From: cygwin-owner On Behalf Of Larry Hall (Cygwin)
Sent: Saturday, January 19, 2008 10:42 PM
To: cygwin
Subject: Re: ssh interactive shell not working

Kyle A. Dawson wrote:

Well, I uninstall Interix and it did fix that weird issue with remote ls,
but still cannot login. I re-ran the cvscheck and attached.

You mentioned you wanted the bash debug output, I thought I sent that as
well? With this command:



ssh -v -v -v -v -v webmadeeasy.net bash --login -i

That is what I sent.  Is there a different command to run for bash debug?



You sent the one with debugging turned on for 'ssh'.  That's fine but since
it's bash where there are suspected troubles, it makes sense to turn on
debugging there too.  You forgot the '-x'.

ssh -v -v -v -v -v webmadeeasy.net bash --login -i -x


 Sorry, I need to read the instructions better.

 Here is the correct log with -x


Right.  Hm, I don't see any issue here, though maybe I'm missing something.
Are there any other bashs on your system?  Does sshing to localhost from the
W2K3 machine exhibit the same behavior?  What if you leave --login out of
the invocation above?  Does it matter?

--
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?

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



Re: ssh interactive shell not working

2008-01-20 Thread Larry Hall (Cygwin)

Kyle A. Dawson wrote:

1) I do not know of any other bash installed at all.


Can you search your disks for 'bash.exe' and see if bashs other than the one
Cygwin version that you expect to find?  If there is more than one, delete
(or rename if you feel more comfortable with that) the others.


2) If I ssh to localhost,it works fine.  ssh localhost. I get a prompt fine.


This makes me think that webmadeeasy != localhost.  How about if you try
ssh webmadeeasy from the W2K3 machine?


3) If I leave out the --login It works but I get a different prompt
$ ssh myhost bash -i
bash-3.2$


That would be expected.  Without --login, you're not running a login shell
and you're not running the login scripts that typically set your prompt.


If I leave out the -k, I get no prompt but I am in, I can run commands, etc.


OK.  Hm, I don't know what that means, though it's a surprising result.
What inspired you to try that?


--
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?

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



Re: less ti/te termcap stuff

2008-01-20 Thread Igor Peshansky
Ananth,

http://cygwin.com/acronyms/#PPIOSPE.  I've redirected this reply to the
list and set the Reply-To: appropriately -- please make sure your mailer
honors it.

On Sun, 20 Jan 2008, Ananth Chellappa wrote:

 Hi Igor,
I saw a post by you related to vim not showing correct
 behaviour - not restoring the screen when it exits like less or man.
 My question is this :  you can get less to not do that by using the -X
 switch. Is there a way to do that with man?

man uses the PAGER environment variable to select the pager program.  By
default it uses less -isrR, IIRC.  You can add any other flags to the
less command by setting PAGER in your environment.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

That which is hateful to you, do not do to your neighbor.  That is the whole
Torah; the rest is commentary.  Go and study it. -- Rabbi Hillel

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



Re: less ti/te termcap stuff

2008-01-20 Thread Ananth Chellappa
Thanks Igor,

 I'll look for what PAGER is set to and try to add flags
there. Really appreciate your help.

Thanks,
Ananth

On 1/20/08, Igor Peshansky [EMAIL PROTECTED] wrote:
 Ananth,

 http://cygwin.com/acronyms/#PPIOSPE.  I've redirected this reply to the
 list and set the Reply-To: appropriately -- please make sure your mailer
 honors it.

 On Sun, 20 Jan 2008, Ananth Chellappa wrote:

  Hi Igor,
 I saw a post by you related to vim not showing correct
  behaviour - not restoring the screen when it exits like less or man.
  My question is this :  you can get less to not do that by using the -X
  switch. Is there a way to do that with man?

 man uses the PAGER environment variable to select the pager program.  By
 default it uses less -isrR, IIRC.  You can add any other flags to the
 less command by setting PAGER in your environment.
Igor
 --
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
 ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

 That which is hateful to you, do not do to your neighbor.  That is the whole
 Torah; the rest is commentary.  Go and study it. -- Rabbi Hillel



-- 
Time wastes our bodies and our wits
But we waste time so we are quits

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



Re: ssh interactive shell not working

2008-01-20 Thread Christopher Faylor
On Sun, Jan 20, 2008 at 05:42:57PM -0600, Kyle A. Dawson wrote:
 If I leave out the -k, I get no prompt but I am in, I can run commands, 
 etc.


I was meaning the -i

I search the entire computer and only found the one bash.exe, in the
existing cygwin home

Here are my cases:

1) If am on the ssh server itself, all works fine, I can logon via ssh
localhost or ssh myhost.  Get prompt and all looks good.
2) If I logon to the ssh server from any other machine with bash -i,
ssh myhost bash -i, all works fine, I get a prompt and can run
commands
3) If I logon to the ssh server from any other machine the normal was,
ssh myhost, it closes connections right away
4) If I logon to the ssh server from any other machine to just run a
command, it works fine.  The command runs on ssh server and shell comes
back
   ssh myhost ls -lart
  ssh myhost hostname
5) If I logon to ssh server from another computer behind the router,
some subnet as server, using the server private ipaddress,
192.168.1.125, still get same issue.  So it is not a router issue.

It appears the issue is something to do with running the bash shell by
default, it just does not for some reason.  I thought something was
messed up with the cygwin config/install, so I deleted the dir and
installed from scratch.  But I get the same errors.

It sure sounds like you are using some non-cygwin version of either sshd
or bash and that the bash you're running isn't recognizing the pty that
the sshd server has started.

You are running the cygwin ssh server right?

cgf

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



RE: ssh interactive shell not working

2008-01-20 Thread Kyle A. Dawson
After looking at all the config files, everything looked ok.  I noticed that
some files have permission weird, with group as  ?.  I noticed that my
group file only had groups from the domain not local groups.  I then append
all the local groups to the /etc/group file, and BAM, everything works.


mkgroup -l  /etc/group

Thanks for everyone that gave suggestions, I learned a lot about debugging
ssh and cygwin.  Thanks Larry for all your help, very good problem solving
steps, if I follow the correctly ;)


Kyle Dawson





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