GithubHelp home page GithubHelp logo

Comments (1)

m8pple avatar m8pple commented on August 15, 2024

Well you don't need to be able to connect to the exchange
in order to check correct operation, it's more just to check
things against slightly different code once you are happy
with it the test env.

That said, assume you have:

  • IMPERIAL_HOST : a machine you can ssh into from outside college
  • EXCHANGE_HOST : a machine inside college where an exchange is running
  • EXCHANGE_PORT : a port on the machine running the exchange
  • LOCAL_PORT : a port on your machine (can probably use EXCHANGE_PORT).

then you should be able to set up an ssh tunnel using:

ssh -L $LOCAL_PORT:$EXCHANGE_HOST:$EXCHANGE_PORT $IMPERIAL_HOST

That will open up an ssh session, but behind the scenes it will also
tunnel port $EXCHANGE_PORT on the localhost to $EXCHANGE_PORT on the
remote host. So in a different (local) shell, you can run:

./bitecoin_miner MyId 4 tcp-client localhost $LOCAL_PORT

However, you may find you get the error (depends on where you ssh to):

open failed: administratively prohibited: open failed

which means your ssh provider is "security conscious".

So, you can get more clever, and use netcat (nc), to get
past that, as if you have stdin and stdout you can always
push a socket over them.

So, you can do:

rm .backwards
mkfifo .backwards
REMOTE_CMD="nc $EXCHANGE_HOST $EXCHANGE_PORT";
FORWARD_CMD="ssh -v -T -x $IMPERIAL_HOST ${REMOTE_CMD}";
nc -lk $LOCAL_PORT 0<.backwards | ${FORWARD_CMD} 1>.backwards

That lets me get in via most ssh hosts. Good luck working out
why it works :)

A possibly more understandable version:

rm .send .recv;
mkfifo .send .recv;
0<.send
ssh -v -T -x $IMPERIAL_HOST nc $EXCHANGE_HOST $EXCHANGE_PORT
1>.recv &
./bitecoin_client MyId 4 file .recv .send

You'll want passwordless authentication, which you should probably
be using anyway. So you'd want to be using ssh-agent, ssh-add, and
friends (or pageant under windows with putty).

A much simpler method to is to just connect to the imperial
VPN. That should allow you to connect directly to any tcp
socket on an internal computer.

David Thomas

On 2014-03-16 23:08, dimchrist89 wrote:

i wanted to ask if it is possible to work on our computers for cw6. You
mention in the description that this can be done via ssh. Could you give
us some details on that? (The problem is the limited time, since the
premises of the college are open untill 12pm)

Thank you in advance,

Dimitrios Christopoulos


Reply to this email directly or view it on GitHub
#3.

from hpce-2013-cw6.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.