any ssh for android that can connect to cygwin's sshd?
I am able to connect to a server running Cygwin's sshd from a computer running debian openssh.. or from a computer running cygwin. So the server is set fine. If the key fails it prompts for a password, i've set the server's sshd_config is set like that. But the Android apps that i've tried e.g. 'better terminal' and perhaps juicessh, tend to use Dropbear ssh, and dropbear ssh gives an error when trying to connect. It says ssh: Connection to user@host:123 exited: No matching algo hostkey maybe the encryption algorithms don't match, but i'm no expert Is there anything I can do at cygwin's sshd end.. Or, any command line ssh client for android that is known to be able to connect to it? -- 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: any ssh for android that can connect to cygwin's sshd?
On Friday, 5 September 2014, 16:18, Richard wrote: On Fri, 5 Sep 2014, Marilo wrote: >> >> I am able to connect to a server running Cygwin's sshd from a computer >> running debian openssh.. or from >>a computer running cygwin. So the server >> is set fine. If the key fails it prompts for a password, i've >>set the >> server's sshd_config is set like that. >> But the Android apps that i've tried e.g. 'better terminal' and perhaps >> juicessh, tend to use Dropbear ssh, and dropbear ssh gives an error when >> trying to connect. It says >> ssh: Connection to user@host:123 exited: >> No matching algo hostkey >> >> maybe the encryption algorithms don't match, but i'm no expert >> Is there anything I can do at cygwin's sshd end.. Or, any command line ssh >> client for android that is known to be able to connect to it? >I use something called "Terminal-IDE". >One big problem with what you want to do is with the keyboard and >Terminal-IDE provides a full keyboard solution... Check it out... >Richard Terminal IDE does indeed have a great keyboard, it installs it and then it's available for any terminal app. Though I see it uses dropbear ssh and gives the same error as better terminal. (in fact, better terminal has a slightly later version of dropbear ssh that includes a -v option), nevertheless.. both are dropbear ssh and give the same error when going to cygwin sshd. Though clearly you guys don't get the error. Here is a screenshot of a packet capture http://i.imgur.com/uqpqMcz.png 10.0.0.4 is my phone, and 10.0.0.5:222 is the cygwin sshd server. Though it(10.0.0.4/my phone), is fine connecting to bitvise sshd on 10.0.0.5:22 or to a linux machine 10.0.0.10:22. And to rule out my WLAN, the one other computer on my WLAN can connect to my cygwin sshd server. I tried moving the cygwin sshd server to port 22 instead of 222. But same error from ssh, and packet capture still showed TCP Dup ACK and I see TCP Retransmission.. but also, this time I see from the packet capture screenshot here, that it got as far as some SSH protocol. But still same error at same point, from dropbear ssh on my mobile. I don't have another device running dropbear ssh to try. http://i.imgur.com/VZpCr95.png I will try reinstalling cygwin on the machine in question. And i'll try turning the router off and on first -- 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: any ssh for android that can connect to cygwin's sshd?
On Fri, 5 Sep 2014, Marilo wrote: >>> >>> I am able to connect to a server running Cygwin's sshd from a computer >>> running debian openssh.. or from a computer running cygwin. So the server >>> is set fine. If the key fails it prompts for a password, i've >>set the >>> server's sshd_config is set like that. >> But the Android apps that i've tried e.g. 'better terminal' and perhaps >> juicessh, tend to use Dropbear ssh, and dropbear ssh gives an error when >> trying to connect. It says >>> ssh: Connection to user@host:123 exited: >>> No matching algo hostkey >>> >>> maybe the encryption algorithms don't match, but i'm no expert >>> Is there anything I can do at cygwin's sshd end.. Or, any command line ssh >>> client for android that is known to be able to connect to it? >>I use something called "Terminal-IDE". >>One big problem with what you want to do is with the keyboard and >>Terminal-IDE provides a full keyboard solution... Check it out... >>Richard >Terminal IDE does indeed have a great keyboard, it installs it and then it's >available for any terminal >app. Though I see it uses dropbear ssh and gives the same error as better >terminal. (in fact, better >terminal has a slightly later version of dropbear ssh that includes a -v >option), nevertheless.. both are > dropbear ssh and give the same error when >going to cygwin sshd. Though clearly you guys don't get > the error. >Here is a screenshot of a packet capture >http://i.imgur.com/uqpqMcz.png >10.0.0.4 is my phone, and 10.0.0.5:222 is the cygwin sshd server. >Though it(10.0.0.4/my phone), is fine connecting to bitvise sshd on >10.0.0.5:22 or to a linux machine 10.0.0.10:22. And to rule out my WLAN, the >one other computer on my WLAN can connect to my cygwin sshd server. >I tried moving the cygwin sshd server to port 22 instead of 222. But same >error from ssh, and packet capture still showed TCP Dup ACK and I see TCP >Retransmission.. but also, this time I see from the packet capture screenshot >here, that it got as far as some SSH protocol. But still same error at same >point, from dropbear ssh on my mobile. I don't have another device running >dropbear ssh to try. >http://i.imgur.com/VZpCr95.png >I will try reinstalling cygwin on the machine in question. And i'll try >turning the router off and on first I was finding VX ConnectBot crashed on it. So none of the apps were working to connect me. I didn't restart the router, but I did reinstall cygwin and that fixed it. So, for some reason the cygwin sshd server was eating some packets and cygwin needed to be reinstalled. I renamed the cygwin directory and cygwin package directories, and reinstalled cygwin. Though thanks for your responses I foudn out that indeed dropbear ssh does support cygwin sshd, and I have the option of the terminal ide keyboard too. -- 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
command line smtp client / command line email?
what are my options for a command line smtp client in cygwin? I'd want to specify smtp server and from address. I'd like TLS/SSL to be supported by the command sendmail , doesn't look like it exists on cygwin and I know on *nix it shuts down any postfix server so I guess it mighttry to shut down any smtp server I have running. heirloom mailx looks good, but doesn't exist for cygwin. I can't see anything for sending an email from/in cygwin -- 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
reload ssh configuration without stopping and starting the service?
I know linux has ways to reload configuration files without restarting a service. Is there a way with cygwin's sshd to reload the configuration files without stopping and starting it. I know of net start sshd, net stop sshd, and I have checked cygrunsrv http://web.mit.edu/cygwin/cygwin_v1.3.2/usr/doc/Cygwin/cygrunsrv.README I see options for start stop install and remove. I don't see any way to reload configuration. -- 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
example for Match Host, in ssh?
I have managed to get Match Address and Match User to work e.g. I see an effect for Match User blah MaxAuthTries 0 But I cannot get Match Host to work I have a computer compa I can ping compa but when in sshd_config I do Match Host compa MaxAuthTries 0 it has no effect And when I try in ssh_config doing Host compaa HostName compa then I try in sshd_config Match Host compaa MaxAuthTries 0 It still have an effect. i'd like to see an example of using Match Host Where am I going wrong? / How can I troubleshoot this? -- 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
a batch that executes a command within cygwin?
I would like to make a batch file that executes a command within cygwin. or tells cygwin to execute some commands when it starts. I know I can do C:\cygwin\bin>nc <--- And that works So there isnt a big reason for me to want to do it within cygwin.. But i'm interested to know if I can.. I can make a batch file that says cd \cygwin cygwin nc pause but it doesn't run the nc command. I'm interested in running a command (nc for example) within cygwin. -- 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
tab autocomplete is going mad (waiting and giving a beep or being slow then displaying too many possibilities)
Tab autocomplete is going mad.. Either A) It waits for a while, in which time I can't type anything, then it gives a beep and exits, letting me type, but not displaying anything or B) It waits for a while, then says there are loads of possibilities I'll demonstrate showing how it is for this directory. First i'll show the directories contents in regular cmd.exe Then i'll show the tab behaviour. There isn't much to show for case A(the case of the beep). But i'll show for Case B(the long listing). And i'm sure if Case A or B is solved, Case A and case B will be solved. So let's look at Case B(the long listing). Here are the real contents of the ccc directory C:\cygwin\home>cd user C:\cygwin\home\user>cd ccc C:\cygwin\home\user\ccc>dir Volume in drive C has no label. Volume Serial Number is B411-D580 Directory of C:\cygwin\home\user\ccc 13/04/2015 10:08 PM . 13/04/2015 10:08 PM .. 13/04/2015 10:08 PM 0 r 1 File(s) 0 bytes 2 Dir(s) 7,146,205,184 bytes free C:\cygwin\home\user\ccc> Or the real contents from cygwin with ls (rather than tab) user@comp ~/ccc $ pwd /home/user/ccc user@comp ~/ccc $ ls r user@comp ~/ccc $ ls -l total 0 -rw-r--r-- 1 user None 0 Apr 13 22:08 r user@comp ~/ccc $ Going into cygwin- C:\cygwin>cygwin For some reason tab is going mad in cygwin user@comp ~/ccc < I hit Tab $ Display all 2382 possibilities? (y or n) ! ) ./ : [ [.exe [[ ]] _DataOracleClientPerfCounters_shared12_neutral.h _DataOracleClientPerfCounters_shared12_neutral.ini _DataPerfCounters.h _DataPerfCounters.ini _dataperfcounters_shared12_neutral.h _dataperfcounters_shared12_neutral.ini _NetworkingPerfCounters.h _Networkingperfcounters.ini _NetworkingPerfCounters_v2.h _Networkingperfcounters_v2.ini _SMSvcHostPerfCounters.h _SMSvcHostPerfCounters.ini _TransactionBridgePerfCounters.h _TransactionBridgePerfCounters.ini { } 1 3rd-party-licenses.txt 7B296FB0-376B-497e-B012-9C450E1B7327-5P-0.C7483456-A289-439 7B296FB0-376B-497e-B012-9C450E1B7327-5P-1.C7483456-A289-439 a.a a.b a.txt a2p.exe aaclient.mof --More-- user@comp ~/ccc $ -- -- 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
I can't connect to ssh
harvey@samsung350 ~ $ nc 127.0.0.1 22 SSH-2.0-OpenSSH_6.6.1 harvey@samsung350 ~ $ ssh 127.0.0.1 Connection closed by 127.0.0.1 I have no authorized_keys file which is fine. I am allowing PasswordAuthentication and also PubKeyAuthentication on the server. My password is not empty. It is not prompting me for any password. It just straight away says "connection closed by 127.0.0.1" I don't have any other computers on the network that I can try from at the moment. $ ssh harvey@127.0.0.1 -v OpenSSH_6.6.1, OpenSSL 1.0.1i 6 Aug 2014 debug1: Reading configuration data /etc/ssh_config debug1: Connecting to 127.0.0.1 [127.0.0.1] port 22. debug1: Connection established. debug1: identity file /home/harvey/.ssh/id_rsa type 1 debug1: identity file /home/harvey/.ssh/id_rsa-cert type -1 debug1: identity file /home/harvey/.ssh/id_dsa type -1 debug1: identity file /home/harvey/.ssh/id_dsa-cert type -1 debug1: identity file /home/harvey/.ssh/id_ecdsa type -1 debug1: identity file /home/harvey/.ssh/id_ecdsa-cert type -1 debug1: identity file /home/harvey/.ssh/id_ed25519 type -1 debug1: identity file /home/harvey/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.6.1 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1 debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x0400 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-md5-...@openssh.com none debug1: kex: client->server aes128-ctr hmac-md5-...@openssh.com none debug1: sending SSH2_MSG_KEX_ECDH_INIT debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ECDSA 90:24:59:xx:31:xx:e2:6d:35:xx:de:d9:87:4d:xx:e7 debug1: Host '127.0.0.1' is known and matches the ECDSA host key. debug1: Found key in /home/harvey/.ssh/known_hosts:5 debug1: ssh_ecdsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: publickey debug1: Offering RSA public key: /home/harvey/.ssh/id_rsa Connection closed by 127.0.0.1 harvey@samsung350 ~ $ harvey@samsung350 ~ $ cat /etc/sshd_config | grep PasswordAuthen #PasswordAuthentication yes # PasswordAuthentication. Depending on your PAM configuration, # PAM authentication, then enable this but set PasswordAuthentication harvey@samsung350 ~ $ cat /etc/sshd_config | grep PubkeyAuth #PubkeyAuthentication yes harvey@samsung350 ~ $ -- 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: I can't connect to ssh
On Sunday, 7 June 2015, 3:48, Jim Garrison wrote: On 6/6/2015 6:15 PM, Marilo wrote: >> >> >> harvey@samsung350 ~ >> $ nc 127.0.0.1 22 >> SSH-2.0-OpenSSH_6.6.1 >> >> >> harvey@samsung350 ~ >> $ ssh 127.0.0.1 >> Connection closed by 127.0.0.1 >> >> >> I have no authorized_keys file which is fine. I am allowing >> PasswordAuthentication and also PubKeyAuthentication on the server. >> My password is not empty. >> >> It is not prompting me for any password. It just straight away says >> "connection closed by 127.0.0.1" >> >> I don't have any other computers on the network that I can try from at the >> moment. [snip] >Check the permissions on the public key file and authorized_keys in >~/.ssh (and the .ssh directory itself). If the target were Linux you >could also look in /var/log/secure to see why the remote closed the >connection. On a cygwin remote system I don't know where the log is >located, but somebody else on the list can probably tell you. Below I have checked all of those i'm not sure if the owner is necessarily ok but the rest seems definitely ok. harvey@samsung350 /var $ ls -l /var/log/sshd.log -rw-r--r-- 1 SYSTEM root 4489 May 13 03:41 /var/log/sshd.log So it hasn't been written to recently harvey@samsung350 /var $ tail -n 1 /var/log/sshd.log /var/empty must be owned by root and not group or world-writable. ok that's an old error harvey@samsung350 /var $ ls -ld /var/empty drwxr-xr-x+ 1 SYSTEM root 0 Aug 29 2014 /var/empty permissions are fine I guess. I'm not sure if owner should say root. Permissions for ~/.ssh and its contents is absolutely correct. I have no ~/.ssh/authorized_keys file though that's ok not to have that. harvey@samsung350 /var $ ls -ld ~/.ssh drwx--+ 1 harvey None 0 Jun 7 01:38 /home/harvey/.ssh harvey@samsung350 /var $ ls -l ~/.ssh total 19 -rw--- 1 harvey None 1679 Aug 29 2014 id_rsa -rw--- 1 harvey None 399 Aug 29 2014 id_rsa.pub -rw--- 1 harvey None 1679 Sep 4 2014 id2_rsa -rw-r--r-- 1 harvey None 870 Jun 6 23:07 known_hosts -rw-r--r-- 1 harvey None 361 Sep 5 2014 known_hosts.bak -rw-r--r-- 1 harvey None 867 Sep 8 2014 known_hostsb -rw-r--r-- 1 harvey None 38 May 21 06:47 oldconfig harvey@samsung350 /var $ I guess my server keys permissions are ok. I'm not sure if owner should be root harvey@samsung350 /etc $ ls -l ssh_* -rw-rwxr-- 1 SYSTEM root 1574 Jun 7 01:35 ssh_config -rw--- 1 SYSTEM root 668 Aug 29 2014 ssh_host_dsa_key -rw-r--r-- 1 SYSTEM root 607 Aug 29 2014 ssh_host_dsa_key.pub -rw--- 1 SYSTEM root 227 Aug 29 2014 ssh_host_ecdsa_key -rw-r--r-- 1 SYSTEM root 179 Aug 29 2014 ssh_host_ecdsa_key.pub -rw--- 1 SYSTEM root 411 Aug 29 2014 ssh_host_ed25519_key -rw-r--r-- 1 SYSTEM root 99 Aug 29 2014 ssh_host_ed25519_key.pub -rw--- 1 SYSTEM root 982 Aug 29 2014 ssh_host_key -rw-r--r-- 1 SYSTEM root 647 Aug 29 2014 ssh_host_key.pub -rw--- 1 SYSTEM root 1675 Aug 29 2014 ssh_host_rsa_key -rw-r--r-- 1 SYSTEM root 399 Aug 29 2014 ssh_host_rsa_key.pub -- 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
can't change a file's permissions + some ssh
after some fiddling with ssh.. removing the service, removing keys, re-running ssh-host-config, I got this error harvey@samsung350 ~ $ tail /var/log/sshd.log @@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@ Permissions 0670 for '/etc/ssh_host_ed25519_key' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. bad permissions: ignore key: /etc/ssh_host_ed25519_key Could not load host key: /etc/ssh_host_ed25519_key Disabling protocol version 2. Could not load host key sshd: no hostkeys available -- exiting. So I tried changing the file's permissions but I can't seem to change them harvey@samsung350 ~ $ ls -l /etc/ssh_host_ed25519_key -rw-rwx---+ 1 cyg_server root 411 Jun 7 17:23 /etc/ssh_host_ed25519_key harvey@samsung350 ~ $ chmod 600 /etc/ssh_* harvey@samsung350 ~ $ ls -l /etc/ssh_host_ed25519_key -rw-rwx---+ 1 cyg_server root 411 Jun 7 17:23 /etc/ssh_host_ed25519_key harvey@samsung350 ~ $ I can run $ echo asdf>c:\fffdfs So I do have administrative permissions. -- 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: can't change a file's permissions + some ssh
>On Jun 7 17:46, Marilo wrote: >> after some fiddling with ssh.. removing the service, removing keys, >> re-running ssh-host-config, I got this >error >> >> harvey@samsung350 ~ >> $ tail /var/log/sshd.log >> @@@ >> @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ >> @@@ >> Permissions 0670 for '/etc/ssh_host_ed25519_key' are too open. >> It is required that your private key files are NOT accessible by others. >> This private key will be ignored. >> bad permissions: ignore key: /etc/ssh_host_ed25519_key >> Could not load host key: /etc/ssh_host_ed25519_key >> Disabling protocol version 2. Could not load host key >> sshd: no hostkeys available -- exiting. >> >> >> So I tried changing the file's permissions but I can't seem to change them >> >> harvey@samsung350 ~ >> $ ls -l /etc/ssh_host_ed25519_key >> -rw-rwx---+ 1 cyg_server root 411 Jun 7 17:23 /etc/ssh_host_ed25519_key >> >> harvey@samsung350 ~ >> $ chmod 600 /etc/ssh_* >> >> harvey@samsung350 ~ >> $ ls -l /etc/ssh_host_ed25519_key >> -rw-rwx---+ 1 cyg_server root 411 Jun 7 17:23 /etc/ssh_host_ed25519_key >Note the extra permissions indicated by the trailing '+'. Try >`setfacl -b /etc/ssh_host_ed25519_key'. >Corinna Thanks.. I reinstalled cygwin so as to update setfacl to include -b and then ran that command and then ssh works. -- 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: SOCKS without SSH?
I mean, purely within what is available in Cygwin, what is available to do it? While I could look to install something natively, I ask, within cygwin, because i'm interested in learning the cygwin tool, and familiarising myself more with the large array of common *nix commands it presents. > From: Marilo > What are my options, what commands, > for setting up a SOCKS server without SSH? > > -- 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
a netcat that supports -X and -x ?
When I google man nc, I see http://linux.die.net/man/1/nc I see -X proxy_version and -x proxy_address[:port] But cygwin's netcat doesn't include that. Is it possible to get a copy of netcat for cygwin(or even for windows, or both) that includes that -x and -X? -- 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
screen goes messy in vi
Here are 2 screenshots of me trying to read a readme.txt file for a program I have the same problem for other files too. It looks fine when I open it.. (in vi) http://i45.tinypic.com/n6rxu1.jpg (after exiting vi) http://i49.tinypic.com/126dxmx.jpg Like when I try to read sshd_config it looks messy too. http://i46.tinypic.com/357py1l.jpg -- 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
How do I build this program for Cygwin?
I don't have a background in C.. I want to compile this program for Cygwin.. http://netcat.cvs.sourceforge.net/viewvc/netcat/?view=tar I know cygwin has a netcat package installed, but I think this one on sourceforge might be more up to date. I've heard for example that the one on sourceforge supports socks, and i'm not sure that the nc built into cygwin does. I want to use the switch -X proto I have the subdirectory here Steve@comp ~/netcat/netcat $ ls -l total 153 -rwxr-xr-x 1 Steve None 45213 Jan 15 2004 ABOUT-NLS -rwxr-xr-x 1 Steve None 473 Dec 10 2003 AUTHORS -rwxr-xr-x 1 Steve None 12620 Oct 24 2004 ChangeLog -rwxr-xr-x 1 Steve None 14987 Jan 15 2004 config.rpath -rwxr-xr-x 1 Steve None 5816 Jan 15 2004 configure.ac -rwxr-xr-x 1 Steve None 17992 May 4 2002 COPYING drwxr-xr-x+ 1 Steve None 0 May 5 23:18 doc -rwxr-xr-x 1 Steve None 9240 Oct 2 2002 INSTALL drwxr-xr-x+ 1 Steve None 0 May 5 23:18 lib drwxr-xr-x+ 1 Steve None 0 May 5 23:18 m4 -rwxr-xr-x 1 Steve None 930 Jan 15 2004 Makefile.am -rwxr-xr-x 1 Steve None 902 Jun 8 2002 Makefile.cvs -rwxr-xr-x 1 Steve None 2929 Jan 15 2004 mkinstalldirs -rwxr-xr-x 1 Steve None 6143 Jan 11 2004 NEWS drwxr-xr-x+ 1 Steve None 0 May 5 23:18 po -rwxr-xr-x 1 Steve None 1041 Jan 3 2004 README -rwxr-xr-x 1 Steve None 2464 Oct 24 2004 README.CVS drwxr-xr-x+ 1 Steve None 0 May 5 23:18 src -rwxr-xr-x 1 Steve None 2019 Oct 24 2004 TODO Steve@comp ~/netcat/netcat But I see no "configure" file, and when I try to run INSTALL I get a syntax error. So i'm wondering if maybe i'm going the wrong way about it. $ ./INSTALL ./INSTALL: line 1: syntax error near unexpected token `C' ./INSTALL: line 1: `Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software' Steve@comp ~/netcat/netcat $ -- 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: How do I build this program for Cygwin?
--- On Sat, 5/5/12, René Berber wrote: > From: René Berber > Subject: Re: How do I build this program for Cygwin? > To: cygwin mailing list > Date: Saturday, 5 May, 2012, 23:54 > On 5/5/2012 5:40 PM, Marilo wrote: > > [snip] > > But I see no "configure" file, and when I try to run > INSTALL I get a syntax error. > > > > So i'm wondering if maybe i'm going the wrong way about > it. > > You read the files README, and INSTALL, follow the > instructions there. > -- > René Berber > Thanks.. Still getting issues though.. $ autoconf-2.13 autoconf: configure.in: No such file or directory -- Steve@cfw5 ~/netcat/netcat $ autoconf-2.68 configure.ac:25: error: possibly undefined macro: AM_INIT_AUTOMAKE If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. configure.ac:29: error: possibly undefined macro: AM_CONFIG_HEADER configure.ac:52: error: possibly undefined macro: AM_GNU_GETTEXT configure.ac:53: error: possibly undefined macro: AM_INTL_SUBDIR configure.ac:56: error: possibly undefined macro: AC_LBL_LIBRARY_NET configure.ac:144: error: possibly undefined macro: AM_CONDITIONAL I tried this at some point as mentioned on a webpage $ autoreconf -f -i -Wall,no-obsolete I saw somebody suggested on a webpage $ autoreconf-2.68 -vi but that said can't exec aclocal.. and said failed.. and running aclocal was suggested I see when looking for autoconf, automake which mentions aclocal so I install that. I think at this stage.. autoreconf-2.68 runs without giving an error or any output at all. Steve@cfw5 ~/netcat/netcat $ ./configure configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." ". /../.." I see libtool suggested.. so I download that.. I see install-sh is in cygwin\usr\share\automake-1.10 and others.. so I copy it to . Then run ./configure then ./configure runs Then I do make and get errors $ make make all-recursive make[1]: Entering directory `/home/Steve/netcat/netcat' Making all in m4 make[2]: Entering directory `/home/Steve/netcat/netcat/m4' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/home/Steve/netcat/netcat/m4' Making all in lib make[2]: Entering directory `/home/Steve/netcat/netcat/lib' Making all in contrib make[3]: Entering directory `/home/Steve/netcat/netcat/lib/contrib' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/home/Steve/netcat/netcat/lib/contrib' make[3]: Entering directory `/home/Steve/netcat/netcat/lib' make[3]: Nothing to be done for `all-am'. make[3]: Leaving directory `/home/Steve/netcat/netcat/lib' make[2]: Leaving directory `/home/Steve/netcat/netcat/lib' Making all in src make[2]: Entering directory `/home/Steve/netcat/netcat/src' gcc -DLOCALEDIR=\"\/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I.. -g -O 2 -Wall -MT udphelper.o -MD -MP -MF .deps/udphelper.Tpo -c -o udphelper.o udphel per.c udphelper.c: In function `udphelper_ancillary_read': udphelper.c:90: error: structure has no member named `ipi_spec_dst' Makefile:316: recipe for target `udphelper.o' failed make[2]: *** [udphelper.o] Error 1 make[2]: Leaving directory `/home/Steve/netcat/netcat/src' Makefile:317: recipe for target `all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/Steve/netcat/netcat' Makefile:257: recipe for target `all' failed make: *** [all] Error 2 Steve@cfw5 ~/netcat/netcat $ I have a look at autoreconf-2.68 which I suppose was meant to work earlier.. and it gives errors $ autoreconf-2.68 m4/lbl-net.m4:36: warning: underquoted definition of AC_LBL_LIBRARY_NET m4/lbl-net.m4:36: run info '(automake)Extending aclocal' m4/lbl-net.m4:36: or see http://www.gnu.org/software/automake/manual/automake. html#Extending-aclocal autoreconf-2.68: configure.ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VE RSION -- 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: How do I build this program for Cygwin?
--- On Sun, 6/5/12, René Berber wrote: > From: René Berber > Subject: Re: How do I build this program for Cygwin? > To: cygwin > Date: Sunday, 6 May, 2012, 5:39 > On 5/5/2012 10:59 PM, Marilo wrote: > > [snip] > > $ autoconf-2.13 > > autoconf: configure.in: No such file or directory > > You followed the wrong instructions. > -- René Berber The instructions - "INSTALL" said 1. configure 2. make .. But the problem is "configure" didn't exist. There were no instructions for that, other than the general idea of trying to run autoconf, which is what I tried to do, as I showed. First $ autoconf-2.13 then $ autoconf-2.68 -- 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: How do I build this program for Cygwin?
--- On Sun, 6/5/12, Mark Geisertwrote: > From: Mark Geisert > Subject: Re: How do I build this program for Cygwin? > To: cygwin > Date: Sunday, 6 May, 2012, 9:46 > Marilo writes: > > > You followed the wrong instructions. > > > > The instructions - "INSTALL" said > > 1. configure > > 2. make > > .. > > > > But the problem is "configure" didn't exist. > > Two things: 1st, Whoever wrote the INSTALL was sloppy and > should have said > "./configure", and the 2nd thing is it's common knowledge > that that's how one > runs configure. You don't have the common knowledge > yet because you're new at > this. That's OK. > > For the heck of it I tried to build this GNU netcat from the > SourceForge > package. I used: > ./configure > make > > That's when I found out the code won't compile because > Cygwin's struct > in_pktinfo is missing a field that Linux apparently has: > ipi_spec_dst. > Fortunately I could get around that by subverting the > configure check for struct > in_pktinfo. I changed line 8865 of configure, > inserting two leading slashes to > comment out the line. Then I ran ./configure > again. Then make. That built a > netcat.exe in the src subdirectory. > > Does it have the options you need? I don't know. > But now you know how to build > it yourself to find out. > HTH, > > ..mark > Thanks.. The instructions in INSTALL seem standard, e.g. they don't mention netcat. it's just a standard set of instructions for doing ./configure and make. They mention ./configure.. What I meant was really there was no configure! What had happened was I downloaded some version without the "configure" file.. I went to the CVS repository http://netcat.cvs.sourceforge.net/netcat/netcat/ and clicked download GNU tarball and got netcat-netcat.tar.gz I should've clicked http://sourceforge.net/projects/netcat/files/latest/download?source=files and got netcat-0.7.1.tar.gz But since you mention "configure" existed, I then found the right one. I amended the configure file as you mention. I still get an error in the make.. and then no netcat.exe in the src subdirectory make[3]: Nothing to be done for `all-am'. make[3]: Leaving directory `/home/Steve/netcat/lib' make[2]: Leaving directory `/home/Steve/netcat/lib' Making all in src make[2]: Entering directory `/home/Steve/netcat/src' gcc -DLOCALEDIR=\"\/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. - g -O2 -Wall -c `test -f 'udphelper.c' || echo './'`udphelper.c gcc -g -O2 -Wall -o netcat.exe core.o flagset.o misc.o netcat.o network.o t elnet.o udphelper.o -lintl core.o: In function `core_listen': /home/Steve/netcat/src/core.c:225: undefined reference to `_udphelper_ancillary_ read' collect2: ld returned 1 exit status Makefile:231: recipe for target `netcat.exe' failed make[2]: *** [netcat.exe] Error 1 make[2]: Leaving directory `/home/Steve/netcat/src' Makefile:220: recipe for target `all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/Steve/netcat' Makefile:175: recipe for target `all' failed make: *** [all] Error 2 -- 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: How do I build this program for Cygwin?
Many thanks that worked. and just prior to that, I tried what elliot said too, (the lesser clean!), make clean then make.. that worked too! It doesn't have -X proto, but it's nice to have GNU netcat 0.7.1 to know what it looks like.. (not too different from the one in cygwin!).. And now I know it can be done! --- On Sun, 6/5/12, Mark Geisert wrote: > From: Mark Geisert > Subject: Re: How do I build this program for Cygwin? > To: cygwin > Date: Sunday, 6 May, 2012, 20:08 > Arrgh. I meant: > > But after editing configure one needs to start the > build over from scratch, so: > > make distclean > > ./configure > > > make > > and you should be all set. > > ..mark -- 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
Having openbsd's version of netcat the Cygwin package setup?
--- On Sun, 6/5/12, JonY wrote: > From: JonY > Subject: Re: How do I build this program for Cygwin? > To: cygwin > Date: Sunday, 6 May, 2012, 23:52 >> On 5/7/2012 04:55, Marilo wrote: >> ... >> It(that GNU version) doesn't have -X proto (either), but it's nice to >> have GNU >> netcat 0.7.1 to know what it looks like.. (not too different >> from the one in cygwin!).. And now I know it can be done! > > I think that's BSD netcat. > > > Thanks for pointing that out.. it's a great lead. This link from 2006 mentions somebody looking for openbsd's version netcat http://cygwin.com/ml/cygwin/2006-04/msg00490.html " .it's an openbsd fork off the original netcat that I never heard of before. Cool. I'll see if it builds for cygwin. cheers, DaveK " I found it here now ported to Cygwin- http://www.daemon.de/Netcat doing -? and -h , I see -X proto It needn't be in place of the current nc We've got the GNU one ported too, - mark found the modification to the "configure" file to get it running. So I use ncgnu.exe ncopenbsd.exe The author of openbsd version of nc ported to cygwin posted on here in March 2011 "OpenBSD version of netcat ported to cygwin" http://readlist.com/lists/cygwin.com/cygwin/10/50653.html But looks like adding it to the cygwin packages didn't happen. I would guess that maybe the threat of pulling the current nc, and replacing it, could be a bit of a disincentive to somebody looking to become a cygwin package maintainer of the openbsd version of the cygwin port. So maybe that's why it didn't quite happen, but that's just a guess. Anyhow since they are different versions, I suppose they could live alongside each other/ both be available. -- 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
installing rsh and rlogin servers - rshd and rlogind
I know ssh is the recommended thing, it has encryption and public keys. But I would like to install and try rsh and the like nonetheless to see what it was like. I'm the only person on my LAN and it's just for my LAN. I would like to use rsh and rlogin, and their respective servers I can see the rsh and rlogin commands, but not their servers. There is a package called rsh-server, but i've looked for the file rsh-server and not found it, and I see no packages mentioning rshd or rlogind or telnetd and I don't see those files on my system. -- 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: installing rsh and rlogin servers - rshd and rlogind
Thanks, I wasn't looking right That's a useful command.. I see some servers now. I am surprised /usr/sbin isn't in the PATH though.. user@comp ~ $ echo $PATH /usr/local/bin:/usr/bin:/cygdrive/c:/cygdrive/c/windows:/cygdrive/c/windows/system32:/cygdrive/c/wind. $ cygcheck -l rsh-server /usr/sbin/rexecd.exe /usr/sbin/rlogind.exe /usr/sbin/rshd.exe /usr/share/man/man8/rexecd.8.gz /usr/share/man/man8/rlogind.8.gz /usr/share/man/man8/rshd.8.gz /etc/defaults/etc/xinetd.d/rexec /etc/defaults/etc/xinetd.d/rlogin /etc/defaults/etc/xinetd.d/rsh /etc/postinstall/rsh.sh /etc/preremove/rsh.sh /etc/xinetd.d/.keep-rsh /usr/share/doc/Cygwin/rsh-server.README --- On Sun, 13/5/12, David Sastre Medina wrote: > From: David Sastre Medina > Subject: Re: installing rsh and rlogin servers - rshd and rlogind > To: cygwin > Date: Sunday, 13 May, 2012, 12:52 > On Sun, May 13, 2012 at 11:29:52AM > +0100, Marilo wrote: > > > > I know ssh is the recommended thing, it has encryption > and public keys. > > But I would like to install and try rsh and the like > nonetheless to see > > what it was like. I'm the only person on my LAN and > it's just for my LAN. > > I would like to use rsh and rlogin, and their > respective servers > > I can see the rsh and rlogin commands, but not their > servers. > > There is a package called rsh-server, but i've looked > for the file rsh-server > > and not found it, and I see no packages mentioning rshd > or rlogind or telnetd > > and I don't see those files on my system. > > http://cygwin.com/cgi-bin2/package-cat.cgi?file=rsh-server%2Frsh-server-0.17-1&grep=rshd > http://cygwin.com/cgi-bin2/package-cat.cgi?file=rsh-server%2Frsh-server-0.17-1&grep=rlogind > > and check the output of > > $ cygcheck -l rsh-server > > -- > Primary key fingerprint: AD8F BDC0 5A2C FD5F A179 60E7 > F79B AB04 5299 EC56 > -- 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: installing rsh and rlogin servers - rshd and rlogind
well, like running net start sshd by accident? I wouldn't run a program without realising it..but maybe some that are dyslexic might so they don't put it in the path. I can't actually get it installed.. user@comp /usr/sbin $./rshd user@comp /usr/sbin $ I run ps and it doesn't show it By the way.. I notice many put an email in the To and an email in the CC. I know it's recommended to remove emails from the body. But wouldn't the email appear in the From and the To and CC, on the mailing list? --- On Sun, 13/5/12, Earnie Boyd wrote: > From: Earnie Boyd > Subject: Re: installing rsh and rlogin servers - rshd and rlogind > To: narium cygwin > Date: Sunday, 13 May, 2012, 21:13 > On Sun, May 13, 2012 at 3:20 PM, > Marilo wrote: > > I am surprised /usr/sbin isn't in the PATH though.. > > Why should the system/server bin be a part of the _user_ > PATH? That > could cause issues of starting/stopping a server unaware. > > -- > Earnie > -- https://sites.google.com/site/earnieboyd > > -- > 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 > > -- 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: Making Unix like paths work when using java program from Cygwin
The java aspect looks like a red herring as not relevant to the problem. You want to run a *nix shell script and presumably don't want to write your own bat file doing the same job. I'm probably missing something but given that there's cygwin, and it's a *nux script, what about just editing the script for your computer, amending the paths in the script, with a find and replace, so /ABC/XYZ is replaced with /cygdrive/c/ABC/XYZ and running the script in cygwin. --- On Fri, 18/5/12, Earnie Boyd wrote: > From: Earnie Boyd > Subject: Re: Making Unix like paths work when using java program from Cygwin > To: cygwin > Date: Friday, 18 May, 2012, 15:58 > On Fri, May 18, 2012 at 9:22 AM, > Csaba Raduly wrote: > > On Fri, May 18, 2012 at 1:51 PM, Earnie Boyd wrote: > >> On Fri, May 18, 2012 at 4:56 AM, himoundary wrote: > >>> > >>> I am working in a team where everyone else has > a Linux/Mac OS X workstation, > >>> but I have a windows workstation. Our project > uses a shell script and a java > >>> program to automate some deployment/setup etc, > which needs to create some > >>> directories of the sort /ABC/XYZ. > >>> Obviously such paths are not valid in Windows. > >>> > >> > >> You spread falsities about Windows. Try the > following in cmd.exe and > >> you will be in a shock for your life. > >> > >> mkdir /ABC/XYZ > > > > Well, I tried it. Maybe you should have, too. > > > > I have before but not working today! ;p > > However rmdir "/abc/xyz" did, note the quotes; the mkdir > command did > not. The one thing I find in Windows, nothing is > consistent. > > > H:\>mkdir /ABC/XYZ > > The syntax of the command is incorrect. > > > > When it comes to computers, it takes more than that to > shock me :) > > I'm still surprised occasionally but not often. > > -- > Earnie > -- https://sites.google.com/site/earnieboyd > > -- > 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 > > -- 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: Making Unix like paths work when using java program from Cygwin
--- On Fri, 18/5/12, Earnie Boyd wrote: > From: Earnie Boyd > Subject: Re: Making Unix like paths work when using java program from Cygwin > Date: Friday, 18 May, 2012, 16:15 > On Fri, May 18, 2012 at 11:11 AM, > Marilo wrote: > > The java aspect looks like a red herring as not > relevant to the problem. > > > > You want to run a *nix shell script and presumably > don't want to write your own bat file doing the same job. > > > > I'm probably missing something but given that there's > cygwin, and it's a *nux script, what about just editing the > script for your computer, amending the paths in the script, > with a find and replace, so /ABC/XYZ is replaced with > /cygdrive/c/ABC/XYZ and running the script in cygwin. > > http://cygwin.com/acronyms/#TOFU > > Why invent that wheel when you have cygpath already to do > the job? > And java isn't going to understand /cygdrive/c either. > Still use /cygdrive/c in the shell script. I wasn't suggesting using /cygdrive/c in his java program. His java program is not so much a cygwin issue, as his shell script is. If his java program has file paths that need amending, then since you point out that a cygwin program could be used to help convert the paths in his java program, then, I see, the java program could be relevant to cygwin in that sense. Note java wouldn't understand "c:\blah\a.txt" it could have "c:\\blah\a.txt" though. A search and replace might be easier though, possibly using regex. How do you get cygpath to do make /v into c:\v ? $ cygpath -aw "/v" C:\cygwin\v and not that i'm suggesting it but out of curiousity, can cygpath take a file and convert any linux paths in it to windows paths? how? and if it can't then i'm not sure its use for this. -- 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
problem with rexec
I know ssh is more secure, but I am interested in rsh/rlogin/rexec.. so i'm just trying it locally on my own few computers, just for the sake of knowing them. rexec is working fine for me locally $ rexec 127.0.0.1 ls Password: _vimrc _vimrc a.a a.ag a.b $ rexec -l user 127.0.0.1 ls Password: _vimrc _vimrc a.a a.ag a.b But when I try it from another machine, it crashes after prompting for the Password. nmap from another machine shows 512/tcp open exec MAC Address: 00:0B:11:36:25:27 (Matsushita Electric Industrial Co.) So the port is open. and rexec can run there as I ran it locally. But when I try It doesn't get past the password stage. $rexec -l user 192.168.56.42 ls Password: It gives no error it just waits forever after prompting for a password I until I do ctrl-c -- 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
why is rsh not running normally but is running rlogin?
As mentioned, I am just trying rexec/rsh/rlogin, just as a test, on my few computers. I know ssh is more secure.. I have uncommented these lines in inetd.conf shell stream tcp nowait root/usr/sbin/tcpd rshd -L login stream tcp nowait root/usr/sbin/tcpd rlogind execstream tcp nowait root/usr/sbin/tcpd rexecd When I try to run rsh locally, this happens $ rsh 127.0.0.1 ls Permission denied. It doesn't even ask for a password. When I do rsh without a command, it launches rlogin. I know because it asks for a password I enter it push ENTER . Then it logs me in, and I run the ps command, and I see rlogin not rsh. And if I give a wrong username then I start doing ctrl-c ctrl-z.. it says rlogin. $ rsh -l sdf 127.0.0.1 Password: Login incorrect login: Password: Login incorrect login: rlogin: connection closed. Is that normal, and which implementations of rsh launch rlogin? BSD? GNU? And why won't it run when I add a command? rexec runs locally with a command, but rsh doesn't. -- 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: why is rsh not running normally but is running rlogin?
--- On Tue, 29/5/12, Marilo wrote: > From: Marilo > Subject: why is rsh not running normally but is running rlogin? > To: cygwin > Date: Tuesday, 29 May, 2012, 10:29 > As mentioned, I am just trying > rexec/rsh/rlogin, just as a test, on my few computers. I > know ssh is more secure.. > > I have uncommented these lines in inetd.conf > shell stream tcp > nowait root > /usr/sbin/tcpd rshd -L > login stream tcp > nowait root > /usr/sbin/tcpd rlogind > exec stream tcp > nowait root > /usr/sbin/tcpd rexecd > > > When I try to run rsh locally, this happens > $ rsh 127.0.0.1 ls > Permission denied. > rsh uses .rhosts and I think permission denied comes when rsh doesn't see localhost/127.0.0.1 in .rhosts btw, rexec uses .netrc man rexec "4. The $HOME/.netrc file will be searched. See ftp(1) for a description of this file's format." and if useful man rshd, man rexecd > It doesn't even ask for a password. > > When I do rsh without a command, it launches rlogin. I know > because it asks for a password I enter it push ENTER . Then > it logs me in, and I run the ps command, and I see rlogin > not rsh. And if I give a wrong username then I start > doing ctrl-c ctrl-z.. it says rlogin. > $ rsh -l sdf 127.0.0.1 > Password: > Login incorrect > login: Password: > Login incorrect > login: rlogin: connection closed. > looks like there's something about that in - man rshd 8. Rshd then validates the user using ruserok(3), which uses the file /etc/hosts.equiv and the .rhosts file found in the user's home directory. The -l option prevents ruserok(3) from doing any valida- tion based on the user's ``.rhosts'' file (unless the user is the superuser and the -h option is used.) If the -h option is not used, superuser accounts may not be accessed via this service at all. Looks like passwordless login doesn't work when you do -l So, you have to be logged in with a user of the same username as the machine you're logging into. (doesn't have to be the same password though). Then you don't need -l and so it will read .rhosts > > Is that normal, and which implementations of rsh launch > rlogin? BSD? GNU? > maybe all http://en.wikipedia.org/wiki/Remote_Shell After the command has finished rsh terminates. If no command is specified then rsh will log in on the remote system using rlogin. > And why won't it run when I add a command? > rexec runs locally with a command, but rsh doesn't. Unix power tools says "If the host is properly set up on the remote machine, then rsh will execute properly, and rlogin will no longer ask for a password when you try to connect to the remote machine. If not set up properly, then rlogin will prompt for a password, and rsh will fail with the message Permission Denied." I haven't tested this much but it seems a bit like rsh without -l, if it gets far enough, either goes in automatically, or says permission denied.. it won't prompt for a password. rexec will go in automatically, or prompt for a password. That aside, there are a number of things to check.. to try to get the logging in working. I did see errors like (I may make a mistake in which solution corresponds to which error) rcmd: 10.1.1.3:514: No error (rcmd 'no error' error I think is fixed by adding to /etc/hosts ) and rcmd: 10.1.1.3:514: Connection reset by peer ( I think was fixed by adding to /etc/hosts.allow ALL : tepa : allow <-- where tepa is an example name of the host) or the line ALL : 10.1.1. : allow ) and blob.lan: Connection refused (I think that was was 'cos inetd wasn't started, a bit pathetic but anyway) and select: protocol failure in circuit setup (I think this was when the firewall was preventing the rsh server from making a reverse connection to the client. ) $ cygcheck -l rsh-server /usr/share/doc/Cygwin/rsh-server.README $cat /usr/share/doc/Cygwin/rsh-server.README ... Finally, on the *client* machine, you may need to allow a 'program exception' in your firewall for the rsh client. The rsh protocol allows the client to specify an additional port (other than 514) that the server will contact, to send stderr information. This port is random, but you need to allow incoming connections on your *client* machine at that port. Windows has no 'stateful' filters for the rsh protocol, so you need to allow the rsh program to 'answer' on any port: thus, a 'program exception'. e.g. . so, /etc/hosts, /etc/hosts.allow, /etc/hosts.deny, ~/.rhosts and the firewall opening the incoming ports and having the program exception ready for the reverse connection. one could do one line in /etc/hosts.
difficulty getting ddrescue to install properly
I've used ddrescue in the past but I can't seem to install it now! I ran https://cygwin.com/setup-x86_64.exe and installed ddrescue In the dropdown under choose packages, I choose "full" so they all show and I choose "ddrescue" it's 1.25-1 and I click it so it installs so it shows "keep". And I click next and it claims to install. I haven't always looked at the version in the past but that kind of procedure has always installed that and things in the past. But then here I can't get ddrescue to run! I'm on Win7. C:\cygwin>dir Volume in drive C has no label. Volume Serial Number is 4645-5DCE Directory of C:\cygwin 20/04/2020 22:48 . 20/04/2020 22:48 .. 05/11/2020 02:29 bin 14/03/2020 01:02 53,342 Cygwin-Terminal.ico 14/03/2020 00:59 88 Cygwin.bat 14/03/2020 01:02 157,097 Cygwin.ico 14/03/2020 00:59 dev 05/11/2020 02:29 etc 22/04/2020 10:00 home 20/04/2020 22:48 lib 14/03/2020 00:35 pk 20/04/2020 22:48 sbin 20/04/2020 22:46 1,352,723 setup-x86_64.exe 14/03/2020 00:59 tmp 14/03/2020 00:58 usr 14/03/2020 00:58 var 4 File(s) 1,563,250 bytes 12 Dir(s) 29,747,658,752 bytes free C:\cygwin>cd bin C:\cygwin\bin>dir dd* Volume in drive C has no label. Volume Serial Number is 4645-5DCE Directory of C:\cygwin\bin 03/02/2017 19:40 83,987 dd.exe 03/04/2020 16:17 118,291 ddrescue.exe 03/04/2020 16:17 59,411 ddrescuelog.exe 3 File(s) 261,689 bytes 0 Dir(s) 29,747,593,216 bytes free C:\cygwin\bin> user@hp-probook1 ~ $ echo $PATH /usr/local/bin:/usr/bin:/cygdrive/c/windows:/cygdrive/c/windows/system32:/cygdrive/c/blah user@hp-probook1 ~ $ ddrescue -bash: ddrescue: command not found user@hp-probook1 ~ $ PATH=$PATH:/usr/bin user@hp-probook1 ~ $ ddrescue -bash: ddrescue: command not found user@hp-probook1 ~ $ echo $PATH /usr/local/bin:/usr/bin:/cygdrive/c/windows:/cygdrive/c/windows/system32:/cygdrive/c/blah:/usr/bin user@hp-probook1 ~ $ user@hp-probook1 ~ $ PATH=$PATH:/bin user@hp-probook1 ~ $ echo $PATH /usr/local/bin:/usr/bin:/cygdrive/c/windows:/cygdrive/c/windows/system32:/cygdrive/c/blah:/usr/bin:/bin user@hp-probook1 ~ $ ddrescue -bash: ddrescue: command not found user@hp-probook1 ~ $ user@hp-probook1 ~ $ which ddrescue which: no ddrescue in (/usr/local/bin:/usr/bin:/cygdrive/c/windows:/cygdrive/c/windows/system32:/cygdrive/c/blah) user@hp-probook1 ~ $ echo $PATH /usr/local/bin:/usr/bin:/cygdrive/c/windows:/cygdrive/c/windows/system32:/cygdrive/c/blah user@hp-probook1 ~ $ PATH=$PATH:/bin user@hp-probook1 ~ $ which ddrescue which: no ddrescue in (/usr/local/bin:/usr/bin:/cygdrive/c/windows:/cygdrive/c/windows/system32:/cygdrive/c/blah:/bin) user@hp-probook1 ~ $ user@hp-probook1 /bin $ cd /bin user@hp-probook1 /bin $ ls dd* dd.exe user@hp-probook1 /bin $ user@hp-probook1 /bin $ cd /cygdrive/c/cygwin/bin user@hp-probook1 /cygdrive/c/cygwin/bin $ ls ddrescue ddrescue user@hp-probook1 /cygdrive/c/cygwin/bin $ ddrescue --help -bash: ddrescue: command not found user@hp-probook1 /cygdrive/c/cygwin/bin $ ./ddrescue --help ddrescue: Both input and output files must be specified. Try '/usr/bin/ddrescue --help' for more information. user@hp-probook1 /cygdrive/c/cygwin/bin $ ls /usr/bin/ddrescue ls: cannot access '/usr/bin/ddrescue': No such file or directory user@hp-probook1 /cygdrive/c/cygwin/bin $ -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
re difficulty getting ddrescue to install properly
>What are your options for running the Cygwin Setup program and your answers >input to dialogue box entries? > Check /var/log/setup.log.full for ddrescue install or errors and if that > shows nothing check /var/log/setup.log, which is a summary of all Cygwin > Setup program runs ever completed under that Cygwin instance. >Did you run the Cygwin Setup program to install ddrescue using the same Cygwin >instance root directory as your usual working instance, is that Cygwin >instance root directory C:/Cygwin, and are you running interactively under >that same Cygwin instance? >How are you starting bash, is it Cygwin bash, and which terminal are you >running under? > [you ask for the output from some commands) For cygwin setup I have install for "all users" root directory c:\cygwin package directory c:\cygwin\pk <-- perhaps not a default but never been an issue before or for any other packages. Other packages install e.g. xxd installs C:\cygwin\bin>dir ddrescue.exe Volume in drive C has no label. Volume Serial Number is 4645-5DCE Directory of C:\cygwin\bin 03/04/2020 16:17 118,291 ddrescue.exe 1 File(s) 118,291 bytes 0 Dir(s) 27,520,688,128 bytes free C:\cygwin\bin>dir xxd.exe Volume in drive C has no label. Volume Serial Number is 4645-5DCE Directory of C:\cygwin\bin 31/03/2020 02:01 18,451 xxd.exe 1 File(s) 18,451 bytes 0 Dir(s) 27,520,688,128 bytes free C:\cygwin\bin> user@hp-probook1 ~ $ ddrescue -bash: ddrescue: command not found user@hp-probook1 ~ $ xxd user@hp-probook1 ~ $ which xxd /usr/bin/xxd user@hp-probook1 ~ $ I am starting Cygwin from the icon, C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico - user@hp-probook1 ~ $ ps PID PPID PGID WINPID TTY UID STIME COMMAND 1307 1298 1307 7228 pty0 197608 08:34:10 /usr/bin/ps 1297 1 1297 14072 ? 197608 08:34:08 /usr/bin/mintty 1298 1297 1298 11424 pty0 197608 08:34:08 /usr/bin/bash user@hp-probook1 ~ $ https://pastebin.com/raw/TGWPwR50 (setup.log) No signs of ddrescue https://pastebin.com/raw/YJRcHHa3 (setup.log.full) No signs of ddrescue user@hp-probook1 ~ $ regtool -v list /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Cygwin\/Installations/ Unknown key prefix. Valid prefixes are: root HKCR HKEY_CLASSES_ROOT config HKCC HKEY_CURRENT_CONFIG user HKCU HKEY_CURRENT_USER machine HKLM HKEY_LOCAL_MACHINE users HKU HKEY_USERS user@hp-probook1 ~ $ regtool -v list /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Cygwin\/setup/ Unknown key prefix. Valid prefixes are: root HKCR HKEY_CLASSES_ROOT config HKCC HKEY_CURRENT_CONFIG user HKCU HKEY_CURRENT_USER machine HKLM HKEY_LOCAL_MACHINE users HKU HKEY_USERS user@hp-probook1 ~ $ cygcheck -f /usr/bin/ddrescue user@hp-probook1 ~ $ cygcheck -f /bin/ddrescue user@hp-probook1 ~ $ user@hp-probook1 ~ $ cygcheck -c ddrescue Cygwin Package Information Package Version Status user@hp-probook1 ~ $ cygcheck ddrescue cygcheck: could not find 'ddrescue' user@hp-probook1 ~ $ -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple