9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] Is there a way to extend telnet through rexport?
@ 2021-04-05 18:13 Mack Wallace
  2021-04-05 20:30 ` Steve Simon
  2021-04-06  2:14 ` Lyndon Nerenberg (VE7TFX/VE6BBM)
  0 siblings, 2 replies; 4+ messages in thread
From: Mack Wallace @ 2021-04-05 18:13 UTC (permalink / raw)
  To: 9front


I have a number of different sites which each have numerous disparate systems that need to be administered - essentially by moving files around. I want to use Plan9/9front to consolidate these systems at each site and present them as a file structure on a server in the main office. So essentially each location has its own subdirectory, and each system as that site is represented by a subdirectory below that.

I have been able to get this to work using various file system mounts, then binding those mounts into a single directory which I then rexport. This allows me to mount this on the server with all the devices represented by different directory below the mount. 

There are some devices that can only be accessed through telnet and tftp. In the long term I would like to have a file system driver written for them, but for the time being, is there a way to represent a telnet connection by way of a file which can then be accessed over the rexport. (It would be nice to be able to do the same with tftp as well as then both would be through the tls link that rexport provides.)

I know one can set up a telnet connection as a service using 'telnet -s svc net!machine'. I currently do this to take a feed from gpsd on another node to then feed it into gpsfs. And I have been able to extend the gpsfs file system through rexport. However, I have not had any luck trying to bind the service file to another subdirectory, or the /srv subdirectory itself and have it show up on the server. Granted I have only tried binding to the exported subdirectory after I’ve already rexported it. Something I need to experiment with. However, if that file can survive the rexport, what then to access it with, as I don’t believe telnet nor con are set up to operate on a file. I have read that the connection as a service is for a console file system. But I am not sure if that would fit into the organization that I am looking to build.

Hoping that maybe someone has done something like this before and that it is stupidly easy.

Thanks,

Mack

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

* Re: [9front] Is there a way to extend telnet through rexport?
  2021-04-05 18:13 [9front] Is there a way to extend telnet through rexport? Mack Wallace
@ 2021-04-05 20:30 ` Steve Simon
  2021-04-06  2:14 ` Lyndon Nerenberg (VE7TFX/VE6BBM)
  1 sibling, 0 replies; 4+ messages in thread
From: Steve Simon @ 2021-04-05 20:30 UTC (permalink / raw)
  To: 9front

If you have exported a telnet session I believe you could use "con -l /srv/XXX" to open a simple
connection to this srv file (I assume the remote telnet will provide any line diciplin you need).

-Steve

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

* Re: [9front] Is there a way to extend telnet through rexport?
  2021-04-05 18:13 [9front] Is there a way to extend telnet through rexport? Mack Wallace
  2021-04-05 20:30 ` Steve Simon
@ 2021-04-06  2:14 ` Lyndon Nerenberg (VE7TFX/VE6BBM)
  2021-04-12 14:37   ` Mack Wallace
  1 sibling, 1 reply; 4+ messages in thread
From: Lyndon Nerenberg (VE7TFX/VE6BBM) @ 2021-04-06  2:14 UTC (permalink / raw)
  To: 9front, Mack Wallace

Mack Wallace writes:
> 
> I have a number of different sites which each have numerous disparate =
> systems that need to be administered - essentially by moving files =
> around. I want to use Plan9/9front to consolidate these systems at each =
> site and present them as a file structure on a server in the main =
> office. So essentially each location has its own subdirectory, and each =
> system as that site is represented by a subdirectory below that.

Depending on how 'disparate' those machines are, you might get
surprisingly close to your goal by running u9fs on the target hosts.
That, combined with a bit of ssh glue on the Plan9 side, will let
you import arbitrary filesystem trees from remote UNIX-like hosts.
It's not completely seamless, and you'll have to accept some very
basic 'all or nothing' permissions -- the exported filesystems will
have the permissions of the uid/gid running u9fs.  But you can get
a surprising amount of work done with this model, despite the
restrictions.

Several years ago I ran a setup like that to remotely monitor and
administer about a half dozen sites scattered all over the place;
it worked remarkably well, even if it wasn't the most blazingly
fast for network I/O.  Since then the Plan9 ssh implementations
have changed, so what I had before no longer works.  But, my lack
of motivation to fix bitrot aside, there's no reason I (read 'you')
couldn't build something like that today.

--lyndon

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

* Re: [9front] Is there a way to extend telnet through rexport?
  2021-04-06  2:14 ` Lyndon Nerenberg (VE7TFX/VE6BBM)
@ 2021-04-12 14:37   ` Mack Wallace
  0 siblings, 0 replies; 4+ messages in thread
From: Mack Wallace @ 2021-04-12 14:37 UTC (permalink / raw)
  To: 9front

Thanks everyone.

Using con -l I was able to connect to a telnet service that was rexported from machine to another. I was able to do this as follows;

First: set up the connection to the host machine as a service
telnet -s service_name host

Second, if one needs to log into the host to keep the host from closing the session, echo the login to a file. In my case, the user name a password were both admin. Knowing that after a connection the host immediately asked for a username and then a password allowed me to do this “blind.” So I used the following twice:
echo admin >> /srv/service_name

To export that service file to another 9front machine, I had to bind that service to another file. In this case I set up an ‘exports’ directory under my home directory. In exports, I ’touched’ a file named for the host. This allowed me to then bind using:
bind /src/service_name /usr/user_name/exports/host_named_file

I was then able to export to the 9front server:
rexport -s exported_service_name /usr/user_name/exports 9front_server 

From the 9front server I was then able to
mount /srv/exported_service_name /n/exported_service_name (or whatever you want)

Then I was able to con -l /n/exported_service_name/host_named_file

This will work fine, as long as one doesn’t do something to make the host at the far end close the connection. For me, this means to never select “quit” (type q)  from a menu of choices that the host provides, but use the control-/ and q for the con program to close its connection without any of the other connections closing.

Hopefully those notes will be useful to someone someday.

For one of the machines I’m connecting to, I did compile u9fs and get it working. I haven’t done much file work with it, but it’s a start. I would love to use u9fs on another device, but the manufacturer has the system pretty locked down, with only telnet and tftp as means of getting files in and out. If only I could crack the root account. Oh well. 

Thanks for the help. 


> On Apr 5, 2021, at 10:14 PM, Lyndon Nerenberg (VE7TFX/VE6BBM) <lyndon@orthanc.ca> wrote:
> 
> Mack Wallace writes:
>> 
>> I have a number of different sites which each have numerous disparate =
>> systems that need to be administered - essentially by moving files =
>> around. I want to use Plan9/9front to consolidate these systems at each =
>> site and present them as a file structure on a server in the main =
>> office. So essentially each location has its own subdirectory, and each =
>> system as that site is represented by a subdirectory below that.
> 
> Depending on how 'disparate' those machines are, you might get
> surprisingly close to your goal by running u9fs on the target hosts.
> That, combined with a bit of ssh glue on the Plan9 side, will let
> you import arbitrary filesystem trees from remote UNIX-like hosts.
> It's not completely seamless, and you'll have to accept some very
> basic 'all or nothing' permissions -- the exported filesystems will
> have the permissions of the uid/gid running u9fs.  But you can get
> a surprising amount of work done with this model, despite the
> restrictions.
> 
> Several years ago I ran a setup like that to remotely monitor and
> administer about a half dozen sites scattered all over the place;
> it worked remarkably well, even if it wasn't the most blazingly
> fast for network I/O.  Since then the Plan9 ssh implementations
> have changed, so what I had before no longer works.  But, my lack
> of motivation to fix bitrot aside, there's no reason I (read 'you')
> couldn't build something like that today.
> 
> --lyndon
> 


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

end of thread, other threads:[~2021-04-12 15:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-05 18:13 [9front] Is there a way to extend telnet through rexport? Mack Wallace
2021-04-05 20:30 ` Steve Simon
2021-04-06  2:14 ` Lyndon Nerenberg (VE7TFX/VE6BBM)
2021-04-12 14:37   ` Mack Wallace

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 NNTP newsgroup(s).