public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* ssh login to cygwin bash?
@ 2018-03-29 15:02 Ulli Horlacher
  2018-03-29 18:02 ` Erik Soderquist
  2018-03-29 19:35 ` Andrey Repin
  0 siblings, 2 replies; 9+ messages in thread
From: Ulli Horlacher @ 2018-03-29 15:02 UTC (permalink / raw)
  To: cygwin

I have installed cygwin openssh and the sshd is running.
When I log in, I get a "DOS shell":

~: uname -a
CYGWIN_NT-6.1 WIN-LS0QDOSDIBL 2.10.0(0.325/5/3) 2018-02-02 15:21 i686 Cygwin
~: ssh localhost
admin@localhost's password:

C:\users\admin>



But I want bash as login shell. How can I configure cygwin sshd for that?


-- 
Ullrich Horlacher              Server und Virtualisierung
Rechenzentrum TIK         
Universitaet Stuttgart         E-Mail: horlacher@tik.uni-stuttgart.de
Allmandring 30a                Tel:    ++49-711-68565868
70569 Stuttgart (Germany)      WWW:    http://www.tik.uni-stuttgart.de/
REF:<20180329142411.GZ12560@rus.uni-stuttgart.de>

--
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] 9+ messages in thread

* Re: ssh login to cygwin bash?
  2018-03-29 15:02 ssh login to cygwin bash? Ulli Horlacher
@ 2018-03-29 18:02 ` Erik Soderquist
  2018-03-29 20:17   ` Ulli Horlacher
  2018-03-29 20:21   ` Brian Inglis
  2018-03-29 19:35 ` Andrey Repin
  1 sibling, 2 replies; 9+ messages in thread
From: Erik Soderquist @ 2018-03-29 18:02 UTC (permalink / raw)
  To: cygwin

On Thu, Mar 29, 2018 at 10:24 AM, Ulli Horlacher wrote:
>
> I have installed cygwin openssh and the sshd is running.
> When I log in, I get a "DOS shell":
>
> ~: uname -a
> CYGWIN_NT-6.1 WIN-LS0QDOSDIBL 2.10.0(0.325/5/3) 2018-02-02 15:21 i686 Cygwin
> ~: ssh localhost
> admin@localhost's password:
>
> C:\users\admin>

I would actually like to know how you managed this, as I have a couple
use cases where this is what I do need...


> But I want bash as login shell. How can I configure cygwin sshd for that?

This is what I get on all of my cygwin setups where I've installed
sshd.  Do you have mintty installed?


-- Erik

--
"I do not think any of us are truly sane, Caleb. Not even you. Courage
is not sanity. Being willing to die for someone else is not sanity."
... "Love is not sane, nor is faith." ... "If sanity lacks those
things, Caleb, I want no part of it."

-- Alexandria Terri in "Weaving the Wyvern" by Alexis Desiree Thorne

--
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] 9+ messages in thread

* Re: ssh login to cygwin bash?
  2018-03-29 15:02 ssh login to cygwin bash? Ulli Horlacher
  2018-03-29 18:02 ` Erik Soderquist
@ 2018-03-29 19:35 ` Andrey Repin
  1 sibling, 0 replies; 9+ messages in thread
From: Andrey Repin @ 2018-03-29 19:35 UTC (permalink / raw)
  To: Ulli Horlacher, cygwin

Greetings, Ulli Horlacher!

> I have installed cygwin openssh and the sshd is running.
> When I log in, I get a "DOS shell":

> ~: uname -a
> CYGWIN_NT-6.1 WIN-LS0QDOSDIBL 2.10.0(0.325/5/3) 2018-02-02 15:21 i686 Cygwin
> ~: ssh localhost
> admin@localhost's password:

> C:\users\admin>


> But I want bash as login shell. How can I configure cygwin sshd for that?

ssh -vv
I'm not sure you actually connect to Cygwin SSHD.
Even if you do, check the user's assigned shell.

getent passwd $USER


-- 
With best regards,
Andrey Repin
Thursday, March 29, 2018 22:27:07

Sorry for my terrible english...


--
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] 9+ messages in thread

* Re: ssh login to cygwin bash?
  2018-03-29 18:02 ` Erik Soderquist
@ 2018-03-29 20:17   ` Ulli Horlacher
  2018-03-29 20:33     ` Marco Atzeri
  2018-03-29 21:19     ` Brian Inglis
  2018-03-29 20:21   ` Brian Inglis
  1 sibling, 2 replies; 9+ messages in thread
From: Ulli Horlacher @ 2018-03-29 20:17 UTC (permalink / raw)
  To: cygwin

On Thu 2018-03-29 (13:00), Erik Soderquist wrote:
> On Thu, Mar 29, 2018 at 10:24 AM, Ulli Horlacher wrote:
> 
> >
> > I have installed cygwin openssh and the sshd is running.
> > When I log in, I get a "DOS shell":
> >
> > ~: uname -a
> > CYGWIN_NT-6.1 WIN-LS0QDOSDIBL 2.10.0(0.325/5/3) 2018-02-02 15:21 i686 Cygwin
> > ~: ssh localhost
> > admin@localhost's password:
> >
> > C:\users\admin>
> 
> I would actually like to know how you managed this, as I have a couple
> use cases where this is what I do need...

I have just installed the openssh cygwin package (via setup). That's it.


> > But I want bash as login shell. How can I configure cygwin sshd for that?
> 
> This is what I get on all of my cygwin setups where I've installed
> sshd.  Do you have mintty installed?

Yes.


-- 
Ullrich Horlacher              Server und Virtualisierung
Rechenzentrum TIK         
Universitaet Stuttgart         E-Mail: horlacher@tik.uni-stuttgart.de
Allmandring 30a                Tel:    ++49-711-68565868
70569 Stuttgart (Germany)      WWW:    http://www.tik.uni-stuttgart.de/
REF:<CACoZoo3dtAvb1FpGfYB6FguJZRFOohTiguxPo-Zn1DkRTVi7aA@mail.gmail.com>

--
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] 9+ messages in thread

* Re: ssh login to cygwin bash?
  2018-03-29 18:02 ` Erik Soderquist
  2018-03-29 20:17   ` Ulli Horlacher
@ 2018-03-29 20:21   ` Brian Inglis
  2018-03-29 21:33     ` Erik Soderquist
  1 sibling, 1 reply; 9+ messages in thread
From: Brian Inglis @ 2018-03-29 20:21 UTC (permalink / raw)
  To: cygwin

On 2018-03-29 11:00, Erik Soderquist wrote:
> On Thu, Mar 29, 2018 at 10:24 AM, Ulli Horlacher wrote:
>>
>> I have installed cygwin openssh and the sshd is running.
>> When I log in, I get a "DOS shell":
>>
>> ~: uname -a
>> CYGWIN_NT-6.1 WIN-LS0QDOSDIBL 2.10.0(0.325/5/3) 2018-02-02 15:21 i686 Cygwin
>> ~: ssh localhost
>> admin@localhost's password:
>>
>> C:\users\admin>
> 
> I would actually like to know how you managed this, as I have a couple
> use cases where this is what I do need...

W10 Developer mode installs and enables minimal MS SSH server for Settings
"Device discovery" mDNS service "SSDP Discovery", also "SSH Server Broker", and
"SSH Server Proxy" services.
Enable/disable them to affect MS W10 SSH server.
In Developer mode you may also have optional Features you can add for OpenSSH
Server and OpenSSH Client.

W10 SSH can connect to WSL bash: web search for "W10 SSH WSL bash".

> This is what I get on all of my cygwin setups where I've installed
> sshd.  Do you have mintty installed?

Base Cygwin package always installed.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
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] 9+ messages in thread

* Re: ssh login to cygwin bash?
  2018-03-29 20:17   ` Ulli Horlacher
@ 2018-03-29 20:33     ` Marco Atzeri
  2018-04-26 14:42       ` Ulli Horlacher
  2018-03-29 21:19     ` Brian Inglis
  1 sibling, 1 reply; 9+ messages in thread
From: Marco Atzeri @ 2018-03-29 20:33 UTC (permalink / raw)
  To: cygwin

On 29/03/2018 21:35, Ulli Horlacher wrote:
> On Thu 2018-03-29 (13:00), Erik Soderquist wrote:
>> On Thu, Mar 29, 2018 at 10:24 AM, Ulli Horlacher wrote:
>>
>>>
>>> I have installed cygwin openssh and the sshd is running.
>>> When I log in, I get a "DOS shell":
>>>
>>> ~: uname -a
>>> CYGWIN_NT-6.1 WIN-LS0QDOSDIBL 2.10.0(0.325/5/3) 2018-02-02 15:21 i686 Cygwin
>>> ~: ssh localhost
>>> admin@localhost's password:
>>>
>>> C:\users\admin>
>>
>> I would actually like to know how you managed this, as I have a couple
>> use cases where this is what I do need...
> 
> I have just installed the openssh cygwin package (via setup). That's it.
> 

to have cygwin openssh server active you need
after the installation of the openssh package:

- run /usr/bin/ssh-host-config to configure sshd the service
- start the service with "cygrunsrv -S sshd"

as it seems you have not done so, likely you have another
ssh server than cygwin one running on your pc.

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] 9+ messages in thread

* Re: ssh login to cygwin bash?
  2018-03-29 20:17   ` Ulli Horlacher
  2018-03-29 20:33     ` Marco Atzeri
@ 2018-03-29 21:19     ` Brian Inglis
  1 sibling, 0 replies; 9+ messages in thread
From: Brian Inglis @ 2018-03-29 21:19 UTC (permalink / raw)
  To: cygwin

On 2018-03-29 13:35, Ulli Horlacher wrote:
> On Thu 2018-03-29 (13:00), Erik Soderquist wrote:
>> On Thu, Mar 29, 2018 at 10:24 AM, Ulli Horlacher wrote:
>>> I have installed cygwin openssh and the sshd is running.
>>> When I log in, I get a "DOS shell":
>>> ~: uname -a
>>> CYGWIN_NT-6.1 WIN-LS0QDOSDIBL 2.10.0(0.325/5/3) 2018-02-02 15:21 i686 Cygwin
>>> ~: ssh localhost
>>> admin@localhost's password:
>>> C:\users\admin>
> I have just installed the openssh cygwin package (via setup). That's it.
>>> But I want bash as login shell. How can I configure cygwin sshd for that?

W10 Developer mode installs and enables minimal MS SSH server for Settings
"Device discovery" mDNS service "SSDP Discovery", also "SSH Server Broker", and
"SSH Server Proxy" services.
Enable/disable them to affect MS W10 SSH server.
In Developer mode you also have Optional Features you can add for OpenSSH
Server and OpenSSH Client.

To connect to Cygwin sshd, disable W10 SSH services as above, uninstall SSH
Optional Features, and in Settings disable Device discovery to stop mDNS.

Then log in under your user account admin and start Cygwin mintty/bash to set up
your Cygwin environment for that user, and in an elevated mintty/bash session,
run ssh-host-config script and answer the questions (normally take the defaults)
to set up sshd as a Windows service running under the cygrunsrv daemon wrapper.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
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] 9+ messages in thread

* Re: ssh login to cygwin bash?
  2018-03-29 20:21   ` Brian Inglis
@ 2018-03-29 21:33     ` Erik Soderquist
  0 siblings, 0 replies; 9+ messages in thread
From: Erik Soderquist @ 2018-03-29 21:33 UTC (permalink / raw)
  To: Brian.Inglis, cygwin

On Thu, Mar 29, 2018 at 4:17 PM, Brian Inglis wrote:
>> I would actually like to know how you managed this, as I have a couple
>> use cases where this is what I do need...
>
> W10 Developer mode installs and enables minimal MS SSH server for Settings
> "Device discovery" mDNS service "SSDP Discovery", also "SSH Server Broker", and
> "SSH Server Proxy" services.
> Enable/disable them to affect MS W10 SSH server.
> In Developer mode you may also have optional Features you can add for OpenSSH
> Server and OpenSSH Client.
>
> W10 SSH can connect to WSL bash: web search for "W10 SSH WSL bash".

That assumes W10 is even an option, and that is not always the case,
especially in legacy-required environments

>> This is what I get on all of my cygwin setups where I've installed
>> sshd.  Do you have mintty installed?
>
> Base Cygwin package always installed.

I have come across mintty somehow not installed before, so I ask.

-- Erik

--
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] 9+ messages in thread

* Re: ssh login to cygwin bash?
  2018-03-29 20:33     ` Marco Atzeri
@ 2018-04-26 14:42       ` Ulli Horlacher
  0 siblings, 0 replies; 9+ messages in thread
From: Ulli Horlacher @ 2018-04-26 14:42 UTC (permalink / raw)
  To: cygwin

On Thu 2018-03-29 (22:21), Marco Atzeri wrote:

> as it seems you have not done so, likely you have another
> ssh server than cygwin one running on your pc.

Late feedback: this was the case!
Thanks for the hint!
I have now disabled the foreign sshd, reinstalled cygwin openssh server,
opened port 22 in the Windows firewall and have now a bash after ssh login!


-- 
Ullrich Horlacher              Server und Virtualisierung
Rechenzentrum TIK         
Universitaet Stuttgart         E-Mail: horlacher@tik.uni-stuttgart.de
Allmandring 30a                Tel:    ++49-711-68565868
70569 Stuttgart (Germany)      WWW:    http://www.tik.uni-stuttgart.de/
REF:<0f72caba-7015-dcf7-069a-c3969eaa1a78@gmail.com>

--
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] 9+ messages in thread

end of thread, other threads:[~2018-04-26 14:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29 15:02 ssh login to cygwin bash? Ulli Horlacher
2018-03-29 18:02 ` Erik Soderquist
2018-03-29 20:17   ` Ulli Horlacher
2018-03-29 20:33     ` Marco Atzeri
2018-04-26 14:42       ` Ulli Horlacher
2018-03-29 21:19     ` Brian Inglis
2018-03-29 20:21   ` Brian Inglis
2018-03-29 21:33     ` Erik Soderquist
2018-03-29 19:35 ` Andrey Repin

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