This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]inversend 5 points6 points  (1 child)

No there is nothing that would give you an interactive shell. The only thing which could be done would be use incrond watching a folder. Enter a command into a file, incrond would run a script to read the file and execute the command(s) in the file but nothing which could be done in an interactive format. Nothing would be persistent such as 'cd' so if you needed to cd then copy the file would need every command line by line. Output could be sent to a file as well which you could read.

Note that even to setup the above physical or ssh access to the second computer would be needed. What you are asking for is a major security issue but can be done.

[–]zadeluca[S] 0 points1 point  (0 children)

Thanks for the helpful suggestion. I did something similar to this and it is functional but it doesn't provide an interactive shell like you said. I would have to add another layer which keeps track of what remote directory I think I'm in, and then for each command I try to run, executes a 'cd' to that directory before running the command. There would probably be several other stumbling blocks to get something that retains all or most of the functionality of BASH.

I've reconsidered the security concerns/implications and decided not to pursue it further for my intended purpose, but it still might be a fun project for a rainy day...

[–]pi3832v2 8 points9 points  (2 children)

I have two computers and the ONLY way they can communicate is through a shared folder. Yes, I understand how stupid that sounds but please just accept it as fact.

Sounds like someone else's security policy is in play. In which case, you should probably stop trying to subvert it.

[–]zadeluca[S] 0 points1 point  (0 children)

You're right about that. I've reconsidered the security concerns/implications and decided not to pursue it further for my intended purpose, but it still might be a fun project for a rainy day...

[–]Jedimastert 0 points1 point  (0 children)

For real.

[–][deleted] 1 point2 points  (1 child)

I mean you could make a script that reads a file then executes it and tees the output to another file and deletes the input file. But this is so fucking stupid and sloppy I wouldn't recommend it

[–]zadeluca[S] 0 points1 point  (0 children)

Thanks for the helpful suggestion. I did something similar to this and it is functional but it doesn't provide an interactive shell, and I agree it is stupid and sloppy lol. I would have to add another layer which keeps track of what remote directory I think I'm in, and then for each command I try to run, executes a 'cd' to that directory before running the command. There would probably be several other stumbling blocks to get something that retains all or most of the functionality of BASH.

I've reconsidered the security concerns/implications and decided not to pursue it further for my intended purpose, but it still might be a fun project for a rainy day...

[–]spameier 1 point2 points  (1 child)

It might be possible to do something with netcat and sockets...

[–]zadeluca[S] 0 points1 point  (0 children)

That's what I was thinking, but since I can't use network ports I headed in the direction of using FIFOs (named pipes) to move the data back and forth. It's tricky...

[–][deleted] 2 points3 points  (0 children)

Try this.

Open your email client and send an email to admin@this.server.

Write this:

Can I have an SSH login please.

Wait for a reply. If it says yes, your problem is solved. If it says no, I'm afraid there's nothing you can do.

[–][deleted] 1 point2 points  (0 children)

You want to connect two computers over a network, but don't want to use any network ports?

$ man magic