public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* cygstart does not pass correct ssh login to rsync
@ 2018-03-17 20:31 John tel
  2018-03-17 21:09 ` Marco Atzeri
  2018-03-18  9:48 ` John tel
  0 siblings, 2 replies; 4+ messages in thread
From: John tel @ 2018-03-17 20:31 UTC (permalink / raw)
  To: cygwin

Hi,
 
I've got a strange problem when combining cygstart with rsync.
 
So using cygstart and ssh to login works:
cygstart ssh -p 1000 -i /home/user/key admin@192.168.1.11
 
Using rsync on its own works:
rsync -PaSh --delete -e 'ssh -p 1000 -i /home/user/key' /cygdrive/C/Users/User/Desktop/ admin@192.168.1.11:/destination/
 
But combining cygstart and rsync does not as the ssh login fails and it asks for the passwrod instead:
cygstart rsync -PaSh --delete -e 'ssh  -vvv -p 1000 -i /home/user/key' /cygdrive/C/Users/User/Desktop/ admin@192.168.1.11:/destination/
 
Unfortunately despite using the -vvv flag, no error message appears other than the request for the user password.
 
 
Does anyone have any ideas as to how to resolve this?
 
Thanks

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cygstart does not pass correct ssh login to rsync
  2018-03-17 20:31 cygstart does not pass correct ssh login to rsync John tel
@ 2018-03-17 21:09 ` Marco Atzeri
  2018-03-18  9:48 ` John tel
  1 sibling, 0 replies; 4+ messages in thread
From: Marco Atzeri @ 2018-03-17 21:09 UTC (permalink / raw)
  To: cygwin

On 17/03/2018 21:20, John tel wrote:
> Hi,
>   
> I've got a strange problem when combining cygstart with rsync.
>   
> So using cygstart and ssh to login works:
> cygstart ssh -p 1000 -i /home/user/key admin@192.168.1.11

I don't understand the need of cygstart here.
I would use just

ssh -p 1000 -i /home/user/key admin@192.168.1.11


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cygstart does not pass correct ssh login to rsync
  2018-03-17 20:31 cygstart does not pass correct ssh login to rsync John tel
  2018-03-17 21:09 ` Marco Atzeri
@ 2018-03-18  9:48 ` John tel
  2018-03-18 10:07   ` Marco Atzeri
  1 sibling, 1 reply; 4+ messages in thread
From: John tel @ 2018-03-18  9:48 UTC (permalink / raw)
  To: cygwin

Thanks for your reply.
I can see what you are asking this question.

Well, ultimately I need to run cygstart with the --hide flag because I want to start this in a hidden window.

Thanks


> Sent: Saturday, March 17, 2018 at 8:20 PM
> From: "John tel" <cygwin@mail.com>
> To: cygwin@cygwin.com
> Subject: cygstart does not pass correct ssh login to rsync
>
> Hi,
>  
> I've got a strange problem when combining cygstart with rsync.
>  
> So using cygstart and ssh to login works:
> cygstart ssh -p 1000 -i /home/user/key admin@192.168.1.11
>  
> Using rsync on its own works:
> rsync -PaSh --delete -e 'ssh -p 1000 -i /home/user/key' /cygdrive/C/Users/User/Desktop/ admin@192.168.1.11:/destination/
>  
> But combining cygstart and rsync does not as the ssh login fails and it asks for the passwrod instead:
> cygstart rsync -PaSh --delete -e 'ssh  -vvv -p 1000 -i /home/user/key' /cygdrive/C/Users/User/Desktop/ admin@192.168.1.11:/destination/
>  
> Unfortunately despite using the -vvv flag, no error message appears other than the request for the user password.
>  
>  
> Does anyone have any ideas as to how to resolve this?
>  
> Thanks

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cygstart does not pass correct ssh login to rsync
  2018-03-18  9:48 ` John tel
@ 2018-03-18 10:07   ` Marco Atzeri
  0 siblings, 0 replies; 4+ messages in thread
From: Marco Atzeri @ 2018-03-18 10:07 UTC (permalink / raw)
  To: cygwin

On 17/03/2018 23:51, John tel wrote:
> Thanks for your reply.
> I can see what you are asking this question.
> 
> Well, ultimately I need to run cygstart with the --hide flag because I want to start this in a hidden window.
> 
> Thanks
> 

bottom post here (and trim your reply please), using that will have 
immediately noticed you replied to your mail and not to mine.

The difference between running ssh from shell and with cygstart
is that cygstart asks windows to do it and so the new process loses
the environment link with the running shell.

Pstree shows the cygstart process on new arms

?─┬─mintty───bash───mintty───bash
   ├─mintty───bash───pstree
   └─mintty───bash


You can see the differences running

  cygstart mintty
  cygstart mintty -

and than using `set` for both terminal.
In the first case the process is not starting a login shell (the - for 
mintty) and the two environments are slight different.

For what you are trying to do, you could use cygstart to run a login 
shell that executes the ssh command.

Regards
Marco

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-18  9:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-17 20:31 cygstart does not pass correct ssh login to rsync John tel
2018-03-17 21:09 ` Marco Atzeri
2018-03-18  9:48 ` John tel
2018-03-18 10:07   ` Marco Atzeri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).