Re: How to improve scp speed?

2005-11-30 Thread Holger Krull

The low speed of ssh and scp is not because of the encyption.
The problem is the 64K limit for the window size in  the protocoll.
Further information and a patch can be found here:

http://www.psc.edu/networking/projects/hpn-ssh/


--
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: enscript-1.6.4-1

2005-11-30 Thread Dr. Volker Zell
> Volker Zell writes:

> I would also put the default config file under the /etc/default
> directory hirarchie. A lot of packages already do this.

man pages and info files also should go to the /usr/share hirarchie.

Ciao
  Volker


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



Redirect SSHD messages from Application to Security log in Win2k

2005-11-30 Thread Listmail
Hi all,

Installed cygwin sshd as a service on Win2k Advanced Server yesterday and it 
works great. I have 2 issues, not real problems.

1) The sshd messages in the Windows Event Viewer Application log are half junk 
and half "real" message. The following junk paragraph appears in every logged 
message. How can I get rid of it ?

The description for Event ID ( 0 ) in Source ( sshd ) cannot be found. The 
local computer may not have the necessary registry information or message DLL 
files to display messages from a remote computer. 

2) I would like the ssh messages to go to the Security log, as it is empty now 
and seems like a logically named place for these events. The application log is 
getting full quickly by ssh logon/logoff messages.

Cheers and TIA for the reply and thanks for Cygwin


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



Call for testing Cygwin snapshot

2005-11-30 Thread Corinna Vinschen
Since we're much too long on the way to the 1.5.19 release and there
are already way too many changes since 1.5.18, we would again like to
ask people for testing the latest snapshot, 2005-Nov-30, from

  http://www.cygwin.com/snapshots/

Please report back in this thread when you encounter a problem, which
you can't reproduce with 1.5.18.  We're interested in regressions in
the first place.

1.5.19 has also some new functionality over 1.5.18.  If you have sources
which take advantage of that stuff if present, we're also interested in
getting feeedback about those:

  - clock_getres, clock_setres.
  - fts(3) functions (BSD).
  - futimes.
  - getline, getdelim.
  - memmem.
  - mlock,munlock.
  - mmap(..., MAP_NORESERVE) for anonymous maps.
  - pread, pwrite.
  - readdir_r.
  - strptime's 'c and 'Z' formats.
  - timelocal, timegm.
  
Keep in mind that we can easier find problems if you attach a brief,
concise, selfcontained testcase, if possible in plain C, which allows
easy reproducing.

If nothing's overly badly broken, we're planning to release 1.5.19
within the next week.  Keep your fingers crossed.

Again, please report all problems as reply to this mail.


Thanks in advance,
Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat, Inc.

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



setup.exe 2.510.2.2 failing after displaying "set_cygdrive_flags" dialog box

2005-11-30 Thread Jonathan
I found this thread in the mailing list archives
http://www.cygwin.com/ml/cygwin/2005-09/threads.html#00901
which is the exact same problem I am having but the thread seemed to die
off with no resolution.  Does anyone know what the resolution was, if one
was reached, or what information should I supply, I have webspace I can
put fairly large files on if needed.

The gist of the problem is that setup.exe fails with the message in the
subject when changing an existing install or after wiping out the existing
install and trying to set up a new install.


--
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: How to improve scp speed?

2005-11-30 Thread Cary Jamison
In news:[EMAIL PROTECTED],
Holger Krull typed:
> The low speed of ssh and scp is not because of the encyption.
> The problem is the 64K limit for the window size in  the protocoll.
> Further information and a patch can be found here:
>
> http://www.psc.edu/networking/projects/hpn-ssh/

I think we all know that encryption is a factor.  The site still states :
   The improvement will also be highly influenced by the capacity of the 
processor to perform the encryption and decryption. Less computational 
expensive ciphers will often provide better throughput than more complex 
ciphers.

And they add a new '-z' switch to get higher throughput without encryption.

But, it is interesting to see how much more throughput they get with their 
buffer tuning.


Cary




--
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: How to improve scp speed?

2005-11-30 Thread Holger Krull

Cary Jamison schrieb:

http://www.psc.edu/networking/projects/hpn-ssh/


I think we all know that encryption is a factor.


But a small one, compared to the limit imposed by the window size.








--
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: cygwin postgres installation

2005-11-30 Thread Reini Urban

Nambi Sankaran schrieb:

Hi Reini

using the release notes I am trying to start postgresql server in my 
cygwin area.
( 
http://xarch.tu-graz.ac.at/home/rurban/software/cygwin/release/postgresql/README 
)


but the initdb process fails due to some errors. please see the log below.
please advice.


The first advice is to use the recommended support email address which 
is [EMAIL PROTECTED]


cygserver and therefore ipc is working okay. just the console output is 
annoying, better is to log to a file or the eventlog.


your template db could not be created, probably due to file permission 
problems at base/1
did you try to install this as service, initdb it as service and then 
initdb it as user? This will not work.
You'd need to check your perms for the database user to read/write to 
$PGDATA


  /etc/rc.d/init.d/postgresql install
  pg_ctl start -l /var/log/posgresql.log
or
  /etc/rc.d/init.d/postgresql initdb

is usually better than simple

  /usr/sbin/initdb  -D /usr/share/postgresql/data

The second advice is to look at your postmaster log and
post your problem as described in http://cygwin.com/problems.html


snambi:/etc/rc.d/init.d>
$echo $CYGWIN
CYGWIN_NT-5.1_server
snambi:/etc/rc.d/init.d>
$cygserver &
[2] 2032
snambi:/etc/rc.d/init.d>
$cygserver: Initialization complete.  Waiting for requests.

snambi:/etc/rc.d/init.d>
$/usr/sbin/initdb  -D /usr/share/postgresql/data
The files belonging to this database system will be owned by user 
"namsanka".

This user must also own the server process.

The database cluster will be initialized with locale C.

creating directory /usr/share/postgresql/data ... ok
creating directory /usr/share/postgresql/data/global ... ok
creating directory /usr/share/postgresql/data/pg_xlog ... ok
creating directory /usr/share/postgresql/data/pg_xlog/archive_status ... ok
creating directory /usr/share/postgresql/data/pg_clog ... ok
creating directory /usr/share/postgresql/data/pg_subtrans ... ok
creating directory /usr/share/postgresql/data/base ... ok
creating directory /usr/share/postgresql/data/base/1 ... ok
creating directory /usr/share/postgresql/data/pg_tblspc ... ok
selecting default max_connections ... sh: line 1:  4016 Bad system 
call "/usr/sbin/postgres.exe" -boot -x0 -F -c shared_buffers=500 
-c max_connections=100 template1 <"/dev/null" >"/dev/null" 2>&1
sh: line 1:  2888 Bad system call "/usr/sbin/postgres.exe" -boot 
-x0 -F -c shared_buffers=250 -c max_connections=50 template1 
<"/dev/null" >"/dev/null" 2>&1
sh: line 1:  2976 Bad system call "/usr/sbin/postgres.exe" -boot 
-x0 -F -c shared_buffers=200 -c max_connections=40 template1 
<"/dev/null" >"/dev/null" 2>&1
sh: line 1:  2296 Bad system call "/usr/sbin/postgres.exe" -boot 
-x0 -F -c shared_buffers=150 -c max_connections=30 template1 
<"/dev/null" >"/dev/null" 2>&1
sh: line 1:  3800 Bad system call "/usr/sbin/postgres.exe" -boot 
-x0 -F -c shared_buffers=100 -c max_connections=20 template1 
<"/dev/null" >"/dev/null" 2>&1
sh: line 1:  2172 Bad system call "/usr/sbin/postgres.exe" -boot 
-x0 -F -c shared_buffers=50 -c max_connections=10 template1 <"/dev/null" 
 >"/dev/null" 2>&1

10
selecting default shared_buffers ... sh: line 1:  3984 Bad system 
call "/usr/sbin/postgres.exe" -boot -x0 -F -c 
shared_buffers=1000 -c max_connections=10 template1 <"/dev/null" 
 >"/dev/null" 2>&1
sh: line 1:  2004 Bad system call "/usr/sbin/postgres.exe" -boot 
-x0 -F -c shared_buffers=900 -c max_connections=10 template1 
<"/dev/null" >"/dev/null" 2>&1
sh: line 1:  2572 Bad system call "/usr/sbin/postgres.exe" -boot 
-x0 -F -c shared_buffers=800 -c max_connections=10 template1 
<"/dev/null" >"/dev/null" 2>&1
sh: line 1:  2568 Bad system call "/usr/sbin/postgres.exe" -boot 
-x0 -F -c shared_buffers=700 -c max_connections=10 template1 
<"/dev/null" >"/dev/null" 2>&1
sh: line 1:  2656 Bad system call "/usr/sbin/postgres.exe" -boot 
-x0 -F -c shared_buffers=600 -c max_connections=10 template1 
<"/dev/null" >"/dev/null" 2>&1
sh: line 1:  3724 Bad system call "/usr/sbin/postgres.exe" -boot 
-x0 -F -c shared_buffers=500 -c max_connections=10 template1 
<"/dev/null" >"/dev/null" 2>&1
sh: line 1:  2040 Bad system call "/usr/sbin/postgres.exe" -boot 
-x0 -F -c shared_buffers=400 -c max_connections=10 template1 
<"/dev/null" >"/dev/null" 2>&1
sh: line 1:  4068 Bad system call "/usr/sbin/postgres.exe" -boot 
-x0 -F -c shared_buffers=300 -c max_connections=10 template1 
<"/dev/null" >"/dev/null" 2>&1
sh: line 1:  4028 Bad system call "/usr/sbin/postgres.exe" -boot 
-x0 -F -c shared_buffers=200 -c max_connections=10 template1 
<"/dev/null" >"/dev/null" 2>&1
sh: line 1:  3828 Bad system call "/usr/sbin/postgres.exe" -boot 
-x0 -F -c shared_buffers=100 -c max_connections=10 template1 
<"/dev/null" >"/dev/null" 2>&1
sh: line 1:  3464 Bad system call "/usr/sbin/postgres.exe" -boot 
-x0 -F -c shared_buffers=50 -c m

Re: How to improve scp speed?

2005-11-30 Thread Brian Dessent
Cary Jamison wrote:

> I think we all know that encryption is a factor.  The site still states :

No, I wouldn't say that we all know that.  I just ran "openssl speed"
and on my very modest Athlon XP 1700 machine and both the aes-128 and
blowfish ciphers clocked in at approximately 60-65 megabytes/sec
throughput.  That's about 50 times faster than the theoretical maximum
throughput of 10Base-T ethernet.  Even this modest system can encrypt 5
times faster than the absolute maximum rate of 100 megabit ethernet.

I think you are vastly overestimating the CPU requirement of
encryption.  And it is also why the original poster should not waste his
time trying to find a nonexistent, useless, and insecure option to
disable encryption.

Brian

--
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: Redirect SSHD messages from Application to Security log in Win2k

2005-11-30 Thread Brian Dessent
Listmail wrote:

> 1) The sshd messages in the Windows Event Viewer Application log are half junk
> and half "real" message. The following junk paragraph appears in every logged
> message. How can I get rid of it ?

It is possible, but not a simple change that you can just enable. 
You'll need to add a messagetable resource to the cygwin DLL and rebuild
it, as well as add registry keys for all event sources.  Search the
mailing list archives for details.  Here is a recent thread:
.

> 2) I would like the ssh messages to go to the Security log, as it is empty now
> and seems like a logically named place for these events. The application log 
> is
> getting full quickly by ssh logon/logoff messages.

This is not possible without modifying the syslog code in cygwin, and
even then I don't know if regular applications can log to the security
log.

Brian

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



how to make ssh-agent automatically

2005-11-30 Thread H.S.
Hi,

I yesterday installed a bare minimum Cygwin (via internet) on to a
laptop running Windows XP. The purpose of the Cygwin installation is to
backup data on to a Linux computer using rsync and ssh.

I was wondering, to allow for passwordless login via ssh I have to run
ssh-agent and ssh-add commands. I have put ssh-agent in .bashrc in
Cygwin user's home and "kill $SSH_AGENT_PID" in .bash_logout. But how do
I deal with ssh-add? In other words, what do I need to do so that a user
doesn't need to do ssh-add each time he logins into his account in
Windows XP (ssh-agent and ssh-add run automatically)? There is no X
server installed, no Gnome, no KDM, no fvwm.

All help is appreciated.
thanks,
->HS


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



Syslog "event source" registration [Was Re: Suggest cygrunsrv extension: --pidfile option (patch included)]

2005-11-30 Thread Igor Pechtchanski
On Thu, 24 Nov 2005, Brian Dessent wrote:

> Christian Franke wrote:
>
> > Unlike syslog, windows event log is intended to store only message
> > parameters, not complete messages.
> > The (probably localized) messages must be provided by such an "event
> > message file" (the misleading MS-term;-), which is essentially an .exe
> > or .dll containing (message id, string) pairs in a resource section.
> > For Cygwin, this would be one trivial (0, "%1") pair.
> >
> > Does such a file (and associated registry tool) exist for Cygwin?
>
> It's trivial to add the RT_MESSAGETABLE resource to cygwin1.dll that
> contains the single message "%1\r\n".  It's complicated by the fact that
> windres doesn't have parsing support for messagetables, but you can just
> specify the raw binary for something this trivial.  If you search the ML
> archives someone posted the appropriate .rc bits a couple years ago.
>
> The hard part is that for every "event source" you need to add keys:
>
> HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Application\(name)\
>EventMessageFile = REG_SZ "c:\path\to\cygwin1.dll"
>TypesSupported = REG_DWORD 0x1f
>
> where (name) is whatever the application passed to openlog()'s first
> parameter.
>
> This sucks because it means that to truly do this right, the code in
> Cygwin's openlog() has got to add these keys every time it's called.
> But it can't just blindly overwrite whatever event source might exist
> already because otherwise a malicious application that called e.g.
> openlog("MsiInstaller", ...) would fubar the MSI event source.  So it's
> got to check if the event source exists, decide if it's a Cygwin event
> source, figure out if the DLL path is correct, and if not, put the
> current cygwin DLL path in the key.
>
> This is not insurmountable but it's kind of a pain.  I've been slowly
> working on a patch that does all this, but it's not ready yet.  For the
> time being I just add event sources manually and it works great.

Why complicate openlog()?  Let the Cygwin applications that use openlog()
do this (e.g., in a postinstall script).  We could even add a utility
package in "Base", similar to "editrights", that contains scripts for
adding and removing this setting (something like 'regtool add
"KEY/$1/VAL"; regtool set "KEY/$1/VAL" "value"') that the postinstall and
preremove scripts can invoke...  That way this would also be cleaned up
if, say, "openssh" were uninstalled.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
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: Syslog "event source" registration [Was Re: Suggest cygrunsrv extension: --pidfile option (patch included)]

2005-11-30 Thread Brian Dessent
Igor Pechtchanski wrote:

> Why complicate openlog()?  Let the Cygwin applications that use openlog()
> do this (e.g., in a postinstall script).  We could even add a utility
> package in "Base", similar to "editrights", that contains scripts for
> adding and removing this setting (something like 'regtool add
> "KEY/$1/VAL"; regtool set "KEY/$1/VAL" "value"') that the postinstall and
> preremove scripts can invoke...  That way this would also be cleaned up
> if, say, "openssh" were uninstalled.

That is certainly a reasonable alternative.  Though it's slightly less
automatic since it requires every package maintainer of any program that
writes to the event log to do something in a postinstall (and presumably
preremove) script.  But if it were turnkey to the point of being able to
just run "add-event-source sshd" in a postinstall, then it wouldn't be
too much hassle, and the user could even do it manually if necessary.

Brian

--
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: how to make ssh-agent automatically

2005-11-30 Thread Karl M

Hi HS...

You can use keychain (a package available from setup.exe).

I do something like

ssh-add -l >/dev/null 2>&1
if [ $? -eq 1 ]; then
 ssh-add
fi

in my .bash_profile, because keychain is slow when I launch several windows.

Why do you kill the agent when you log out? (Windows will kill it when you 
log off from windows.)
If you want to keep the agent around from one login to the next, you can 
launch the agent as a service. I used to do that with keychain, but for 
performance reasons, I use ssh-agent and ssh-add directly. I plan on 
proposing a package for doing this.


HTH,

...Karl



From: "H.S."
Subject: how to make ssh-agent automatically
Date: Wed, 30 Nov 2005 17:56:21 -0500

Hi,

I yesterday installed a bare minimum Cygwin (via internet) on to a
laptop running Windows XP. The purpose of the Cygwin installation is to
backup data on to a Linux computer using rsync and ssh.

I was wondering, to allow for passwordless login via ssh I have to run
ssh-agent and ssh-add commands. I have put ssh-agent in .bashrc in
Cygwin user's home and "kill $SSH_AGENT_PID" in .bash_logout. But how do
I deal with ssh-add? In other words, what do I need to do so that a user
doesn't need to do ssh-add each time he logins into his account in
Windows XP (ssh-agent and ssh-add run automatically)? There is no X
server installed, no Gnome, no KDM, no fvwm.

All help is appreciated.
thanks,
->HS


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





--
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: how to make ssh-agent automatically

2005-11-30 Thread H.S.
Hi Karl,

Karl M wrote:
> Hi HS...
> 
> You can use keychain (a package available from setup.exe).
> 
> I do something like
> 
> ssh-add -l >/dev/null 2>&1
> if [ $? -eq 1 ]; then
>  ssh-add
> fi
> 
> in my .bash_profile, because keychain is slow when I launch several
> windows.

Okay, I will try that. BTW, just out of curosity, is using keychain only
one of the methods to achieve this or is it the only method? I mean, is
it possible to do this without keychain or any other packages and just
with ssh and rsync and login/logout files and environment variables?


> 
> Why do you kill the agent when you log out? (Windows will kill it when
> you log off from windows.)

Currently I was starting ssh-agent in cygwin command prompt window. And
if I did not kill ssh-agent the window would not close upon exit. By
killing if from .bash_logout solved that problem.

thanks,
->HS

> If you want to keep the agent around from one login to the next, you can
> launch the agent as a service. I used to do that with keychain, but for
> performance reasons, I use ssh-agent and ssh-add directly. I plan on
> proposing a package for doing this.
> 
> HTH,
> 
> ...Karl
> 
> 


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



[ANNOUNCEMENT] Updated: gnome-keyring-0.4.6-1

2005-11-30 Thread Yaakov S (Cygwin Ports)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

The following packages have been updated in the Cygwin distribution:

*** gnome-keyring-0.4.6-1

GNOME Keyring is a system to store passwords and other sensitive data in
a standardized way across all GNOME applications.

A keyring stores a collection of encrypted passwords and encrypted
information about those passwords. A user can have multiple keyrings,
each for a different use, but there is a "default" one. There is also a
special "session" keyring which is not stored on disk and goes away when
you log out.

This release is an update to the newest upstream version.


Yaakov

- - --  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, look
at the "List-Unsubscribe: " tag in the email header of this message.
Send email to the address specified there.  It will be in the format:

[EMAIL PROTECTED]

If you need more information on unsubscribing, start reading here:

http://sources.redhat.com/lists.html#unsubscribe-simple

Please read *all* of the information on unsubscribing that is available
starting at this URL.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDjmF+piWmPGlmQSMRAnR4AKCEvQpuqO61c8SR71AcoBBimyiXIgCgrl7F
VhbGaLKMiTuzpyQucMFlp78=
=+phx
-END PGP SIGNATURE-

--
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: how to make ssh-agent automatically

2005-11-30 Thread Karl M

Hi H.S

Using keychain is only one way, it is not the only way. I no longer use 
keychain.


I launch ssh-agent from a bash script that is run as a service from 
cygrunsrv; it is run as the user, not as SYSTEM. This makes the ssh-agent 
process survive Windows logout; I only have to enter a passphrase after 
reboot. The bash script edits the user registry to define the environment 
variable for the ssh-agent socket. It sends a message that the environment 
has been updated and then waits on a sleeping child to keep the service 
control manager happy.


The script looks like

$ cat /bin/secret-agent-service
#!/bin/bash
# Launch the ssh-agent from a service so it survives logoff.

# When the service stops, kill the ssh-agent.
trap "ssh-agent -k;
 exit 0" TERM

# Clean up old files that may be left behind after a crash.
#   The file permissions make this safe to do in a multi-user
#   environment, but "/tmp" must be local to this host.
rm -rf /tmp/ssh-*

# Launch the ssh-agent.
eval $(ssh-agent)

# Provide the ssh-agent socket ID via the registry and broadcast
#   the change in case the user is logged before we finish.
#   Do not provide the ssh-agent PID to minimize the risk of
#   killing the ssh-agent.
regtool -s set /HKEY_CURRENT_USER/Environment/SSH_AUTH_SOCK $SSH_AUTH_SOCK
sendchenv

# Wait quietly until the service is stopped.
while true; do
 sleep 24h &
 wait
done

In my .bash_profile I have

ssh-add -l >/dev/null 2>&1
if [ $? -eq 1 ]; then
 ssh-add
fi

which checks if the agent is there and needs a passphrase, and if so, 
invokes ssh-add and I enter my passphrase.


I will look at the new cygrunsrv changes and see if I can simplify things 
and then propose a package.


This saves almost one second of CPU time when I start a bash window, 
compared to using keychain (also launched as a service).


HTH,

...Karl


From: "H.S." Subject: Re: how to make ssh-agent automatically
Date: Wed, 30 Nov 2005 21:24:20 -0500

Hi Karl,

Karl M wrote:
> Hi HS...
>
> You can use keychain (a package available from setup.exe).
>
> I do something like
>
> ssh-add -l >/dev/null 2>&1
> if [ $? -eq 1 ]; then
>  ssh-add
> fi
>
> in my .bash_profile, because keychain is slow when I launch several
> windows.

Okay, I will try that. BTW, just out of curosity, is using keychain only
one of the methods to achieve this or is it the only method? I mean, is
it possible to do this without keychain or any other packages and just
with ssh and rsync and login/logout files and environment variables?


>
> Why do you kill the agent when you log out? (Windows will kill it when
> you log off from windows.)

Currently I was starting ssh-agent in cygwin command prompt window. And
if I did not kill ssh-agent the window would not close upon exit. By
killing if from .bash_logout solved that problem.

thanks,
->HS

> If you want to keep the agent around from one login to the next, you can
> launch the agent as a service. I used to do that with keychain, but for
> performance reasons, I use ssh-agent and ssh-add directly. I plan on
> proposing a package for doing this.
>
> HTH,
>
> ...Karl
>
>


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





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



zone alarm service depency problem with sshd

2005-11-30 Thread H. S.

Hi,

I am trying to have sshd running on my Windows XP box. I have Zone Alarm 
installed, ver. 6.0.667.


I configured sshd with:
$> ssh-host-config

and started as a service:
$> cygrunsrv -S sshd
which promptly made Zone Alarm to ask if sshd should be allowed internet 
access. I allowed it's client as well as server access. And it worked 
from my other LAN PCs.


But then I noticed that after I rebooted the Windows XP box, I could no 
longer ssh to it from another computer even though the sshd service was 
running. Zone Alarm was blocking it. I had restart sshd service to make 
Zone Alarm ware to allow access to/from it.


A little google search resulted in making Zone Alarm service a 
dependency of sshd. So:

1. I removed sshd service using "cygrunsrv -R sshd"
2. I installed it again by making Zone Alarm service as it's dependency:
$> cygrunsrv -I sshd -p /usr/sbin/sshd -f "Cygwin SSH Demon" -y zlclient.exe

4. I rebooted the machine, but still couldn't connect to it via ssh. I 
noticed that sshd was not running!

3. So I restarted the service. But I get this error:
[EMAIL PROTECTED] ~
$ cygrunsrv -S sshd
cygrunsrv: Error starting a service: StartService:  Win32 error 1075:
The dependency service does not exist or has been marked for deletion.

I tried chaning the name of the dependency service to "zlclient" but 
that did not make any difference.


Can anybody suggest where I am going wrong?

thanks,
->HS




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



[ANNOUNCEMENT] Updated: stunnel-4.14-1

2005-11-30 Thread Marcel Telka
I've updated the stunnel package to version 4.14-1.

Stunnel is a program that allows you to encrypt arbitrary TCP connections
inside SSL (Secure Sockets Layer). Stunnel can allow you to secure non-SSL
aware daemons and protocols (like POP, IMAP, LDAP, etc) by having Stunnel
provide the encryption, requiring no changes to the daemon's code.

Changes since 4.12-1:
- Updated to mainstream 4.14

To update your installation, click on the "Install Cygwin now" link on
the http://cygwin.com/ web page. This downloads setup.exe to your
system. Then, run setup and answer all of the questions.

If you have questions or comments, please send them to the Cygwin
mailing list at: cygwin@cygwin.com . I would appreciate it if you
would use this mailing list rather than emailing me directly.

  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, look
at the "List-Unsubscribe: " tag in the email header of this message.
Send email to the address specified there.  It will be in the format:

[EMAIL PROTECTED]

If you need more information on unsubscribing, start reading here:

http://sources.redhat.com/lists.html#unsubscribe-simple

Please read *all* of the information on unsubscribing that is available
starting at this URL.

-- 
Marcel Telka

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



[SOLVED] Re: zone alarm service depency problem with sshd

2005-11-30 Thread H. S.

H. S. wrote:

Hi,

I am trying to have sshd running on my Windows XP box. I have Zone Alarm 
installed, ver. 6.0.667.


I configured sshd with:
$> ssh-host-config

and started as a service:
$> cygrunsrv -S sshd
which promptly made Zone Alarm to ask if sshd should be allowed internet 
access. I allowed it's client as well as server access. And it worked 
from my other LAN PCs.


But then I noticed that after I rebooted the Windows XP box, I could no 
longer ssh to it from another computer even though the sshd service was 
running. Zone Alarm was blocking it. I had restart sshd service to make 
Zone Alarm ware to allow access to/from it.


A little google search resulted in making Zone Alarm service a 
dependency of sshd. So:

1. I removed sshd service using "cygrunsrv -R sshd"
2. I installed it again by making Zone Alarm service as it's dependency:
$> cygrunsrv -I sshd -p /usr/sbin/sshd -f "Cygwin SSH Demon" -y 
zlclient.exe


The problem was that ... er ... zlclient is not a service at all, or so 
it seems to me (since "tasklist /svc" in a command prompt listed it, it 
first looked as service to me).


So I stopped the service:
$ cygrunsrv -E sshd

then removed it
$ cygrunsrv -R sshd

and then this command solved the problem (there was another problem of 
CYGWIN env. too but I didn't know about it earlier):
$ cygrunsrv -I sshd -p /usr/sbin/sshd -f "Cygwin SSH Demon"  -a'-D' -e 
'CYGWIN=binmode ntsec tty' -y tcpip -y vsmon


After giving this command, I restarted the service
$ cygrunsrv -S sshd

and rebooted. I was then able to log in to the XP box just after booting 
(without loggin as any user).


->HS


--
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: Re: how to make ssh-agent automatically

2005-11-30 Thread Morche Matthias
Simpler than using keychain and ssh-agent, Hmm... did You ever try to
just generate your key by ssh-keygen and then copy the public key
~/.ssh/id_dsa.pub eg to Your remote host into ~/.ssh/authorized_keys.
Would You consider this to be simpler?

  matthias



H.S. wrote:
> Hi Karl,
> 
> Karl M wrote:
>> Hi HS...
>> 
>> You can use keychain (a package available from setup.exe).
>> 
>> I do something like
>> 
>> ssh-add -l >/dev/null 2>&1
>> if [ $? -eq 1 ]; then
>>  ssh-add
>> fi
>> 
>> in my .bash_profile, because keychain is slow when I launch several
>> windows.
> 
> Okay, I will try that. BTW, just out of curosity, is using keychain
> only one of the methods to achieve this or is it the only method? I
> mean, is it possible to do this without keychain or any other
> packages and just with ssh and rsync and login/logout files and
> environment variables? 
...

--
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: how to make ssh-agent automatically

2005-11-30 Thread H. S.

Morche Matthias wrote:

Simpler than using keychain and ssh-agent, Hmm... did You ever try to
just generate your key by ssh-keygen and then copy the public key
~/.ssh/id_dsa.pub eg to Your remote host into ~/.ssh/authorized_keys.
Would You consider this to be simpler?

  matthias


(Yes, I have done this. This is necessary to make passwordless ssh 
login. And this is not what I was talking about anyway.)


Even if I assume for an instant I hadn't done this, how would this 
remove the need to run ssh-add on my local machine each time I reboot 
and login?




->HS



--
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: Re: how to make ssh-agent automatically

2005-11-30 Thread Morche Matthias
You just want to connect from one host to another one. It's totally
sufficient to set up the key and copy the public part into authorized
keys on the remote host. I never used ssh-agent nor ssh-add and
passwordless logins to several hosts and Windows are hourly routine. Why
do you need them?

  matthias



H. S. wrote:
> Morche Matthias wrote:
>> Simpler than using keychain and ssh-agent, Hmm... did You ever try to
>> just generate your key by ssh-keygen and then copy the public key
>> ~/.ssh/id_dsa.pub eg to Your remote host into ~/.ssh/authorized_keys.
>> Would You consider this to be simpler?
>> 
>>   matthias
> 
> (Yes, I have done this. This is necessary to make passwordless ssh
> login. And this is not what I was talking about anyway.)
> 
> Even if I assume for an instant I hadn't done this, how would this
> remove the need to run ssh-add on my local machine each time I reboot
> and login?
> 
> 
> 
> ->HS

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