public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: ssh tunnel and permission denied
@ 2005-10-13 14:47 Leonard Bouchet
  0 siblings, 0 replies; 11+ messages in thread
From: Leonard Bouchet @ 2005-10-13 14:47 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 789 bytes --]

--- Brian Dessent <brian@dessent.net> a écrit:

> That won't work if the share requires a password, which your original
> post implied.  What I meant was to "net use" the share as Z: (providing
> the password) and then "mount z:/ /foo/bar".

I can't test on the Win98 box right now, but the good news is the share is 
working perfectly (and at a decent speed) on the WinXP remote system.

So it seems to be a Win98 only failure, something I can live with. I would still 
be interested in knowing what's going on, though.

Thanks and Regards,

-leonard bouchet



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

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

* RE: ssh tunnel and permission denied
  2005-10-13 11:26           ` Corinna Vinschen
@ 2005-10-13 12:25             ` Tevfik Karagülle
  0 siblings, 0 replies; 11+ messages in thread
From: Tevfik Karagülle @ 2005-10-13 12:25 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1874 bytes --]

As of version 2.6.0, rsync uses ssh as default transport mechanism. Rsh is still supported by 'rsync
-e rsh' syntax.

Rgrds Tev 

> -----Original Message-----
> From: Corinna Vinschen [mailto:corinna-cygwin@cygwin.com] 
> Sent: 13. oktober 2005 13:26
> To: cygwin@cygwin.com
> Subject: Re: ssh tunnel and permission denied
> 
> On Oct 13 13:01, L?onard Bouchet wrote:
> > 
> > On 13 oct. 05, at 12:45, Brian Dessent wrote:
> > 
> > >But I guess that doesn't matter, since the net use 
> succeeds and you 
> > >can access Z: through explorer.  What happens if you try 
> mounting Z:/ 
> > >instead of using /cygdrive?
> > 
> > Thanks for your answer. I tried
> > 	$ mount //myserver/user /test
> > the command worked as shown with
> > 	$ mount
> > 	\\myserver\user on /tmp type system (binmode)
> > 	...
> > but I still have my 'permission denied'
> > 	$ cd /test
> > 	BASH: cd: data: Permission denied
> > 
> > And this time I cannot access C:\cygwin\test through 
> Windows Explorer.
> > 
> > I forgot to say that the share is a samba server, maybe 
> it's a problem? 
> > I also tried to put 'set CYGWIN=smbntsec' in my cygwin.bat 
> without any 
> > success.
> > 
> > 
> > >I've done SMB-over-ssh in the past but I used PPTP, not 
> this method 
> > >(for the binding reasons already mentioned.)  I abandoned 
> it though 
> > >because over a broadband connection it was untolerably slow.
> > 
> > I hope it will be fast enough for me. The reason I don't want to 
> > simply use SFTP is that I need rsync's synchronization 
> capability... 
> > If someone can suggest a better way, I'll buy it...
> 
> I'm not sure I understand your problem, but why don't you 
> just use `rsync -e ssh'?
> 
> 
> Corinna
> 
> -- 
> Corinna Vinschen                  Please, send mails 
> regarding Cygwin to
> Cygwin Project Co-Leader          cygwin AT cygwin DOT com
> Red Hat, Inc.
> 

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3022 bytes --]

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

* Re: ssh tunnel and permission denied
@ 2005-10-13 12:22 Leonard Bouchet
  0 siblings, 0 replies; 11+ messages in thread
From: Leonard Bouchet @ 2005-10-13 12:22 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 734 bytes --]

--- Corinna Vinschen <corinna-cygwin@cygwin.com> a écrit:

> I'm not sure I understand your problem, but why don't you just use
> `rsync -e ssh'?

That's the first thing I tried, several days ago, I should have mentionned it!

It doesn't work because I have trouble with special characters and european 
accents (my remote system is Mac Os X). It seems to be a referrenced bug with 
rsync (adding the capability to choose remote system's charset), and I couldn't 
find a way to fix it...

-leonard bouchet




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

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

* Re: ssh tunnel and permission denied
  2005-10-13 11:02         ` Léonard Bouchet
  2005-10-13 11:26           ` Corinna Vinschen
@ 2005-10-13 11:33           ` Brian Dessent
  1 sibling, 0 replies; 11+ messages in thread
From: Brian Dessent @ 2005-10-13 11:33 UTC (permalink / raw)
  To: cygwin

Léonard Bouchet wrote:

> Thanks for your answer. I tried
>         $ mount //myserver/user /test
> the command worked as shown with
>         $ mount
>         \\myserver\user on /tmp type system (binmode)
>         ...
> but I still have my 'permission denied'
>         $ cd /test
>         BASH: cd: data: Permission denied

That won't work if the share requires a password, which your original
post implied.  What I meant was to "net use" the share as Z: (providing
the password) and then "mount z:/ /foo/bar".

> And this time I cannot access C:\cygwin\test through Windows Explorer.

Of course you can't, Explorer has no concept of a Cygwin mount.

> I hope it will be fast enough for me. The reason I don't want to simply
> use SFTP is that I need rsync's synchronization capability... If
> someone can suggest a better way, I'll buy it...

As Corinna said, why not just use rsync?

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/

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

* Re: ssh tunnel and permission denied
  2005-10-13 11:02         ` Léonard Bouchet
@ 2005-10-13 11:26           ` Corinna Vinschen
  2005-10-13 12:25             ` Tevfik Karagülle
  2005-10-13 11:33           ` Brian Dessent
  1 sibling, 1 reply; 11+ messages in thread
From: Corinna Vinschen @ 2005-10-13 11:26 UTC (permalink / raw)
  To: cygwin

On Oct 13 13:01, L?onard Bouchet wrote:
> 
> On 13 oct. 05, at 12:45, Brian Dessent wrote:
> 
> >But I guess that doesn't matter, since the net use succeeds and you can
> >access Z: through explorer.  What happens if you try mounting Z:/
> >instead of using /cygdrive?
> 
> Thanks for your answer. I tried
> 	$ mount //myserver/user /test
> the command worked as shown with
> 	$ mount
> 	\\myserver\user on /tmp type system (binmode)
> 	...
> but I still have my 'permission denied'
> 	$ cd /test
> 	BASH: cd: data: Permission denied
> 
> And this time I cannot access C:\cygwin\test through Windows Explorer.
> 
> I forgot to say that the share is a samba server, maybe it's a problem? 
> I also tried to put 'set CYGWIN=smbntsec' in my cygwin.bat without any 
> success.
> 
> 
> >I've done SMB-over-ssh in the past but I used PPTP, not this method 
> >(for
> >the binding reasons already mentioned.)  I abandoned it though because
> >over a broadband connection it was untolerably slow.
> 
> I hope it will be fast enough for me. The reason I don't want to simply 
> use SFTP is that I need rsync's synchronization capability... If 
> someone can suggest a better way, I'll buy it...

I'm not sure I understand your problem, but why don't you just use
`rsync -e ssh'?


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/

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

* Re: ssh tunnel and permission denied
  2005-10-13 10:45       ` Brian Dessent
@ 2005-10-13 11:02         ` Léonard Bouchet
  2005-10-13 11:26           ` Corinna Vinschen
  2005-10-13 11:33           ` Brian Dessent
  0 siblings, 2 replies; 11+ messages in thread
From: Léonard Bouchet @ 2005-10-13 11:02 UTC (permalink / raw)
  To: cygwin


On 13 oct. 05, at 12:45, Brian Dessent wrote:

> But I guess that doesn't matter, since the net use succeeds and you can
> access Z: through explorer.  What happens if you try mounting Z:/
> instead of using /cygdrive?

Thanks for your answer. I tried
	$ mount //myserver/user /test
the command worked as shown with
	$ mount
	\\myserver\user on /tmp type system (binmode)
	...
but I still have my 'permission denied'
	$ cd /test
	BASH: cd: data: Permission denied

And this time I cannot access C:\cygwin\test through Windows Explorer.

I forgot to say that the share is a samba server, maybe it's a problem? 
I also tried to put 'set CYGWIN=smbntsec' in my cygwin.bat without any 
success.


> I've done SMB-over-ssh in the past but I used PPTP, not this method 
> (for
> the binding reasons already mentioned.)  I abandoned it though because
> over a broadband connection it was untolerably slow.

I hope it will be fast enough for me. The reason I don't want to simply 
use SFTP is that I need rsync's synchronization capability... If 
someone can suggest a better way, I'll buy it...

-leonard bouchet


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

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

* Re: ssh tunnel and permission denied
  2005-10-13  9:59     ` Leonard Bouchet
@ 2005-10-13 10:45       ` Brian Dessent
  2005-10-13 11:02         ` Léonard Bouchet
  0 siblings, 1 reply; 11+ messages in thread
From: Brian Dessent @ 2005-10-13 10:45 UTC (permalink / raw)
  To: cygwin

Leonard Bouchet wrote:

> Actually, according to netstat, the binding works because it listens to
> 127.0.0.1:139, while the windows' sharing service listens to my locally
> assigned ip address, for example 192.168.1.25:139.
> 
> That's my guess after some additional researches. I still don't know
> why I get a 'permission denied' when I try to access this mounted
> drive, though.

That was what I suspected.  Even if you aren't sharing anything the SMB
server still is listening on the interface.  It looks like ssh only
binds to localhost and not 0.0.0.0 which would fail.

But I guess that doesn't matter, since the net use succeeds and you can
access Z: through explorer.  What happens if you try mounting Z:/
instead of using /cygdrive?

I've done SMB-over-ssh in the past but I used PPTP, not this method (for
the binding reasons already mentioned.)  I abandoned it though because
over a broadband connection it was untolerably slow.

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/

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

* Re: ssh tunnel and permission denied
  2005-10-13  8:39   ` Leonard Bouchet
@ 2005-10-13  9:59     ` Leonard Bouchet
  2005-10-13 10:45       ` Brian Dessent
  0 siblings, 1 reply; 11+ messages in thread
From: Leonard Bouchet @ 2005-10-13  9:59 UTC (permalink / raw)
  To: cygwin


On 13 oct. 05, at 10:38, Leonard Bouchet wrote:

> I'm simply not sharing anything on the W98 box.

Actually, according to netstat, the binding works because it listens to 
127.0.0.1:139, while the windows' sharing service listens to my locally 
assigned ip address, for example 192.168.1.25:139.

That's my guess after some additional researches. I still don't know 
why I get a 'permission denied' when I try to access this mounted 
drive, though.

Thanks for your help,

-leonard bouchet


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

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

* Re: ssh tunnel and permission denied
  2005-10-12 22:30 ` Brian Dessent
@ 2005-10-13  8:39   ` Leonard Bouchet
  2005-10-13  9:59     ` Leonard Bouchet
  0 siblings, 1 reply; 11+ messages in thread
From: Leonard Bouchet @ 2005-10-13  8:39 UTC (permalink / raw)
  To: cygwin


On 13 oct. 05, at 00:30, Brian Dessent wrote:

> Leonard Bouchet wrote:
>
>> # Step 1: open the ssh tunnel
>> $ ssh -fNL 139:myserver:139 user@myserver
>
> I'm surprised that this works.  Normally if you try this on a windows
> machine the port forwarding setup will fail because the local SMB
> service on that machine is already listening on 139, and so it's
> impossible for ssh to bind to that port.  How are you getting around
> this?  Have you tried adding verbosity (-vvv) to the ssh command to see
> if there are errors setting up the port forwarding?

I'm simply not sharing anything on the W98 box. On the XP box where I 
need the sharing facility, I'm planning to add a loopback card with 
another ip (procedure found here: 
<http://www.blisstonia.com/eolson/notes/smboverssh.php>). Don't know 
yet how I will bind the forwarding to that network through cygwin, 
tough.

I'm quite sure the port forwarding works, though, because:

1. I tried to add verbosity, and it seems that everything is ok
	...
	debug1: Authentication succeeded (publickey).
	debug1: Local connections to LOCALHOST:139 forwarded to remote address 
myserver:139
	debug3: channel_setup_fwd_listener: type 2 wildcard 0 addr NULL
	debug1: Local forwarding listening on 127.0.0.1 port 139.
	debug2: fd 4 setting O_NONBLOCK
	debug3: fd 4 is O_NONBLOCK
	debug1: channel 0: new [port listener]
	...

2. My lmhosts entry for 'myserver' is set to 127.0.0.1 and I can't get 
the next step to work if I don't forward the port according to step 
1...

Any idea on what it's going on?

Thanks a log,

-leonard bouchet


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

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

* Re: ssh tunnel and permission denied
  2005-10-12 18:03 Leonard Bouchet
@ 2005-10-12 22:30 ` Brian Dessent
  2005-10-13  8:39   ` Leonard Bouchet
  0 siblings, 1 reply; 11+ messages in thread
From: Brian Dessent @ 2005-10-12 22:30 UTC (permalink / raw)
  To: cygwin

Leonard Bouchet wrote:

> # Step 1: open the ssh tunnel
> $ ssh -fNL 139:myserver:139 user@myserver

I'm surprised that this works.  Normally if you try this on a windows
machine the port forwarding setup will fail because the local SMB
service on that machine is already listening on 139, and so it's
impossible for ssh to bind to that port.  How are you getting around
this?  Have you tried adding verbosity (-vvv) to the ssh command to see
if there are errors setting up the port forwarding?

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/

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

* ssh tunnel and permission denied
@ 2005-10-12 18:03 Leonard Bouchet
  2005-10-12 22:30 ` Brian Dessent
  0 siblings, 1 reply; 11+ messages in thread
From: Leonard Bouchet @ 2005-10-12 18:03 UTC (permalink / raw)
  To: cygwin

Hi all,

I'm trying to configure smb over ssh with cygwin and have some trouble. 
I can't access my smb drive through cygwin when I'm mounting it 
throught the ssh tunnel. Here are the steps I follow:

# Step 1: open the ssh tunnel
$ ssh -fNL 139:myserver:139 user@myserver

# Step 2: connect to the smb drive
$ net use 'Z:' '\\myserver\user' <mypassword>

# Step 3: try to access the drive
$ cd /cygdrive/z
BASH: cd: z: Permission denied


Note: When I follow this procedure without tunnelling (direct access to 
the smb drive), I can access the drive without any problem.
Note 2: I can normally access Z through windows' explorer, it's only 
through cygwin that I have a 'Permission denied'

Can anyone help me on this?
	
Thanks a lot,

-l

P.S. using Windows 98 at the moment, but planning to do the same on XP 
Pro, I hope it's a Win98 related bug...


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

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

end of thread, other threads:[~2005-10-13 14:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-13 14:47 ssh tunnel and permission denied Leonard Bouchet
  -- strict thread matches above, loose matches on Subject: below --
2005-10-13 12:22 Leonard Bouchet
2005-10-12 18:03 Leonard Bouchet
2005-10-12 22:30 ` Brian Dessent
2005-10-13  8:39   ` Leonard Bouchet
2005-10-13  9:59     ` Leonard Bouchet
2005-10-13 10:45       ` Brian Dessent
2005-10-13 11:02         ` Léonard Bouchet
2005-10-13 11:26           ` Corinna Vinschen
2005-10-13 12:25             ` Tevfik Karagülle
2005-10-13 11:33           ` Brian Dessent

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