Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <Algebr> I am writing an ssh library and need the a local ssh server to test
- against. I turned it on in Remote login under system preferences but
- when I check who is listening on port 22 I get nothing. [09:39]
- <Algebr> but I know its working cause I can do ssh <name>@localhost just fine
- [09:40]
- <mwilson> "check who is listening"? [09:41]
- <Algebr> The server part of ssh listens on port 22, usually. [09:43]
- <mwilson> Thank you, I'm not a moron. I was more interested in what you
- thought you meant by "check who is listening".
- <Algebr> Touchy. I use this shell function, who_on_port () { [09:44]
- <Algebr> lsof -n -i4TCP:$1 | grep LISTEN
- <Algebr> }
- <Algebr>
- <Algebr>
- <shauno> sshd should be launched on demand by launchd [09:46]
- <shauno> eg, you should notice it's missing from the process list when you're
- not connected to it either
- <mwilson> The only thing that's running all the time is ssh-agent
- <Algebr> Okay, then how is ssh name@localhost working? [09:47]
- <mwilson> So you didn't actually bother to read what he said, or anything?
- <Algebr> ? [09:48]
- <mwilson> shauno: Linuxer. [09:49]
- <Algebr> shauno: can i force it to be on now, all the time at least for
- debugging.
- <mwilson> shauno: But he's "writing a ssh library", whatever he thinks he
- means by that.
- <Algebr> It means I'm writing OCaml bindings to libssh, does that even matter?
- [09:50]
- <Algebr> What is up with this channel
- <mwilson> How sshd works on OS X isn't going to change, I point out to you
- that if you can't deal with it, it is you who has the problem, not
- the other way around.
- <shauno> have you ever used inetd or xinetd? [09:51]
- <Algebr> no
- <shauno> hm. that'd make it easier to explain, since they're the closest
- parallels
- <Algebr> Okay will look it up. What did the GUI checkbox do then? [09:52]
- <mwilson> What it says it does. Enable Remote Login.
- <shauno> launchd can watch incoming connections and pass them off to on-demand
- services [09:53]
- <mwilson> This is a technique at least 20 years old.
- <shauno> yeah. that's what inetd was doing too
- <Algebr> shauno: Can I force it to be up all the time instead of on-demand?
- <mwilson> Yes, but he's a Linuxer, you can't expect him to understand it.
- [09:54]
- <turtle_> you could write your own launchd plist and run sshd how ever you
- want
- <shauno> the catch is that launchd is close enough to the kernel that other
- processes won't actually see it listening
- <mwilson> Algebr: If you think you need to have sshd running all the time, it
- is you who have the problem.
- <mwilson> Algebr: Again, if whatever you think you're creating has that
- requirement, it is fundamentally broken on OS X. [09:55]
- <shauno> yeah, it would need pretty much a complete rewrite of
- /System/Library/LaunchDaemons/ssh.plist
- <shauno> but as mwilson so tactfully puts it, it really shouldn't matter. you
- try to connect, a daemon spawns and accepts the connection. there
- should be no noticable difference in behaviour [09:56]
- <mwilson> shauno: You'd think in 2015, software could deal with inetd/xinetd
- techniques.
- <Algebr> This is a very unfriendly and rude channel. Thanks shauno for the
- pointers.
- ERC>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement