Discussion:
[9fans] ssh to osx
(too old to reply)
arisawa
2013-05-26 11:25:55 UTC
Permalink
Hello,

thanks to geoff and others, we can now connect to linux using ssh in official distribution from bell-labs.

term% ssh -r ***@hebe
Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-38-generic-pae i686)

* Documentation: https://help.ubuntu.com/

Last login: Sun May 26 11:00:17 2013 from maia.local
hebe$

where hebe is one of my linux host.

however I don't succeed yet in connecting to Mac using the ssh.

term% ssh -r ***@mmac
ssh: auth ctl msg `ssh-userauth k arisawa <password>' for /net/ssh/clone: ssh-userath auth failed (not Established)

where mmac is mac mini that runs on osx/lion.
ssh server of mmac is working as shown below.

hebe$ ssh ***@mmac
The authenticity of host 'mmac (192.168.1.7)' can't be established.
RSA key fingerprint is 80:0a:fc:62:42:e1:22:5b:81:ee:2d:21:b2:bc:ee:75.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'mmac,192.168.1.7' (RSA) to the list of known hosts.
Password:
Last login: Thu May 23 06:55:11 2013
-bash$

I don't understand the difference of ssh server between linux and osx.
any suggestion is welcome.
anyone get connected to mac using ssh of Plan9?

Kenji Arisawa
l***@proxima.alt.za
2013-05-26 12:05:59 UTC
Permalink
Post by arisawa
I don't understand the difference of ssh server between linux and osx.
any suggestion is welcome.
anyone get connected to mac using ssh of Plan9?
I can't answer that. Is it possible for you to run sshd on the iMAC
with debug options? That will give you at least some hints on where
the problem lies. That said, there are bits of SSH 2 that still need
work if I read the man pages correctly.

++L
steve
2013-05-26 13:48:07 UTC
Permalink
the mac only enables "keyboard interactive" auth and not "password" auth,
these are very similar but different. you need to an option in a config file
on the mac to enable password auth.

i have done this on my mac, but to be honest i cannot remember what i did.
i found it on google somewhere and i am sure you will too. perhaps you will
be more through than i was and add a wiki entry when you work it out.

-Steve
Post by arisawa
Hello,
thanks to geoff and others, we can now connect to linux using ssh in official distribution from bell-labs.
Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-38-generic-pae i686)
* Documentation: https://help.ubuntu.com/
Last login: Sun May 26 11:00:17 2013 from maia.local
hebe$
where hebe is one of my linux host.
however I don't succeed yet in connecting to Mac using the ssh.
ssh: auth ctl msg `ssh-userauth k arisawa <password>' for /net/ssh/clone: ssh-userath auth failed (not Established)
where mmac is mac mini that runs on osx/lion.
ssh server of mmac is working as shown below.
The authenticity of host 'mmac (192.168.1.7)' can't be established.
RSA key fingerprint is 80:0a:fc:62:42:e1:22:5b:81:ee:2d:21:b2:bc:ee:75.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'mmac,192.168.1.7' (RSA) to the list of known hosts.
Last login: Thu May 23 06:55:11 2013
-bash$
I don't understand the difference of ssh server between linux and osx.
any suggestion is welcome.
anyone get connected to mac using ssh of Plan9?
Kenji Arisawa
l***@proxima.alt.za
2013-05-26 14:00:06 UTC
Permalink
Post by steve
the mac only enables "keyboard interactive" auth and not "password" auth,
these are very similar but different. you need to an option in a config file
on the mac to enable password auth.
Based on the Unixes I'm familiar with, the sshd config file is in
/etc/ssh and is unusual in that it does not have the more conventional
.conf extension. It is specifically for SSHD, the server. Which
needs to be restarted if the config is changed.

++L
arisawa
2013-05-29 00:47:34 UTC
Permalink
thanks, the problem is resolved.

accessing from plan9 to mac with factotum data
key proto=pass service=ssh server=mmac.local user=arisawa !password=XXXX
we fails:
maia% ssh mmac
ssh: auth ctl msg `ssh-userauth k arisawa <password>' for /net/ssh/clone: ssh-userath auth failed (not Established)
maia%
where maia is one of my plan9 hosts and mmac is a mac mini.

the log message in /var/log/secure.log on the mac is
May 27 07:19:30 mmac sshd[71497]: fatal: Read from socket failed: Connection reset by peer

I found ssh2 shows more graceful message as shown below.
maia% ssh2 mmac
connect is 0
Fingerprint: 80 0A FC 62 42 E1 22 5B 81 EE 2D 21 B2 BC EE 75
Authentication methods: publickey,keyboard-interactive
No supported authentication methods found!
maia%

yes, we need password authentication support by sshd on mac.
just putting
PasswordAuthentication yes
to /etc/sshd_config is enough to be authenticated.

now I can enter mac using ssh2
maia% ssh2 mmac
connect is 0
Fingerprint: 80 0A FC 62 42 E1 22 5B 81 EE 2D 21 B2 BC EE 75
Authentication methods: publickey,password,keyboard-interactive
Authentication by password succeeded.
Last login: Wed May 29 08:43:52 2013 from maia

-bash$

thanks all.

Kenji Arisawa
Post by l***@proxima.alt.za
Post by steve
the mac only enables "keyboard interactive" auth and not "password" auth,
these are very similar but different. you need to an option in a config file
on the mac to enable password auth.
Based on the Unixes I'm familiar with, the sshd config file is in
/etc/ssh and is unusual in that it does not have the more conventional
.conf extension. It is specifically for SSHD, the server. Which
needs to be restarted if the config is changed.
++L
Steve Simon
2013-05-29 08:29:06 UTC
Permalink
Post by arisawa
maia% ssh2 mmac
connect is 0
Fingerprint: 80 0A FC 62 42 E1 22 5B 81 EE 2D 21 B2 BC EE 75
Authentication methods: publickey,password,keyboard-interactive
Authentication by password succeeded.
Last login: Wed May 29 08:43:52 2013 from maia
-bash$
I do this a lot.

I find p9p a bit heavyweight for my taste - I prefer to use unix commands
on unix. Having said this I find bash ugly. The current rc on the labs distribution
should compile on osx (though I haven't tried that one for a while, I use
Linux more).

the only other bits I find I need are p.c mc.c and ls.c which I have back-ported
to posix - you are welcome to these if you want them.

-Steve
erik quanstrom
2013-05-29 13:45:48 UTC
Permalink
Post by Steve Simon
I find p9p a bit heavyweight for my taste - I prefer to use unix commands
on unix. Having said this I find bash ugly. The current rc on the labs distribution
should compile on osx (though I haven't tried that one for a while, I use
Linux more).
how do you keep all those different regular expressions straight? :-)

- erik
Steve Simon
2013-05-29 21:55:33 UTC
Permalink
Post by erik quanstrom
how do you keep all those different regular expressions straight? :-)
This is indeed the biggest pain.

that and searching through the manual of GNU stuff looking for the option you want,
even the usage seems to run to several pages these days.

-Steve
Charles Forsyth
2013-05-29 15:40:17 UTC
Permalink
Post by Steve Simon
I prefer to use unix commands
on unix
I'd prefer to use unix commands when on unix, but since the Plan 9 ones
are closer to unix's than any of the gnu ones, I stick with p9p.
arisawa
2013-05-30 00:02:48 UTC
Permalink
Hello,

I made mistake
Post by arisawa
now I can enter mac using ssh2
maia% ssh2 mmac
connect is 0
Fingerprint: 80 0A FC 62 42 E1 22 5B 81 EE 2D 21 B2 BC EE 75
Authentication methods: publickey,password,keyboard-interactive
Authentication by password succeeded.
Last login: Wed May 29 08:43:52 2013 from maia
-bash$
I should use official ssh:
maia% ssh -r mmac
Last login: Wed May 29 10:23:44 2013 from maia
-bash$

NOTE: ssh2 is in //sources.cs.bell-labs.com/contrib/john

maia% ls -l ssh*
--rwxrwxr-x M 360 arisawa sys 110296 May 4 07:22 ssh
--rwxrwxr-x M 360 arisawa sys 217137 May 4 07:22 ssh1
--rwxrwxr-x M 360 sys sys 6384255 Oct 23 2010 ssh2
--rwxrwxr-x M 360 arisawa sys 299827 May 4 07:22 sshnet
maia%
erik quanstrom
2013-05-30 00:13:25 UTC
Permalink
Post by arisawa
maia% ssh -r mmac
Last login: Wed May 29 10:23:44 2013 from maia
-bash$
NOTE: ssh2 is in //sources.cs.bell-labs.com/contrib/john
maia% ls -l ssh*
--rwxrwxr-x M 360 arisawa sys 110296 May 4 07:22 ssh
--rwxrwxr-x M 360 arisawa sys 217137 May 4 07:22 ssh1
--rwxrwxr-x M 360 sys sys 6384255 Oct 23 2010 ssh2
--rwxrwxr-x M 360 arisawa sys 299827 May 4 07:22 sshnet
maia%
ssh2 is also in /n/sources/plan9/sys/src/cmd/ssh2, and it's
not a port of openssh.

- erik

Loading...