Re: Automation Sans Window Server
Re: Automation Sans Window Server
- Subject: Re: Automation Sans Window Server
- From: "Mark J. Reed" <email@hidden>
- Date: Wed, 16 Apr 2008 05:32:19 -0400
Fire up Terminal, and you have a command line shell on your local
host. Type "ssh someOtherMac", supply the password, and now your
Terminal is effectively running on the remote Mac. You can do
anything that you can do in a local Terminal, except that anything
that requires the window server won't work unless you left yourself
logged in on the console of the other Mac, too.
That's basic ssh. (Note that if your short user name is different on
the two Macs, you have to type "ssh otherUsername@someOtherMac"
instead of just "ssh someOtherMac".)
You don't have to do any of the key generation stuff - that's a
security/convenience feature that let's you avoid typing the password
everytime. It is especially convenient for automation, though, which
frequently uses quick one-offs of the form "ssh hostname command",
which connects to the remote machine just long enough to run the given
command and then exits.
On 4/16/08, Philip Aker <email@hidden> wrote:
> On 08-04-16, at 01:17, Axel Luttgens wrote:
>
> > Above steps (1 to 3) are the hard way for a first glance at ssh.
> > I mean, they may prove extremely useful for password-less ssh
> > connections, but they involve a forest of conventions that may hide
> > the tree.
> >
> > Assuming your various machines are regular OS X ones, let's say the
> > remote box you want to connect to has a user named "philip", and
> > "remote.local" as rendezvous name.
> > On the remote box, just enable ssh from the sharing preference pane.
> > Then, on this box (the client box), just type:
> > ssh email@hidden
> > in Terminal.
> > You should then be prompted for the password of user "philip" on the
> > remote box (for a first connection, there will be some number
> > crunching and a question about the identity of the remote box
> > itself; the result will be a key stored in your ~/.ssh/known_hosts
> > file, on the client, that will be re-used upon subsequent
> > connections for verifying the identity of the remote box).
> > Once the password entered, you should now be running a shell on the
> > remote box, as user "philip", the shell being the one defined in
> > remote philip's account.
> > On the client, the ssh command now transparently gives you access to
> > the remote shell's standard streams.
> >
> > The remote connection being opened and handled by the remote system-
> > wide launchd process, this has of course some consequences on the
> > context in which the remote shell is running. That said, any command
> > liable to be run from a shell is a candidate command...
> >
> >
> >> Can I do the same from single user mode?
> >
> >
> > Do you mean running the client in single user mode and connecting to
> > the remote box? I guess so (but I never tried; will try once I have
> > to reboot some box).
> >
> >
> >> What's a standard call for ssh-keygen?
> >
> >
> > Just noticed Simon already replied to that one.
> > I would add that there's no real standard, as everything strongly
> > depends on your needs. For example, if you are happy with an
> > interactive key creation as well as the command's defaults, then a
> > straight:
> > ssh-keygen
> > may prove OK.
>
>
> Thanks as well Axel,
>
> I now have a choice of three methods (cup runneth over)!
>
>
> Philip Aker
> echo email@hidden@nl | tr a-z@. p-za-o.@
>
> Sent from my SE/30
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
--
Sent from Gmail for mobile | mobile.google.com
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden