Details

Let’s be more verbose about this example :

We write a file with the mandatory information to connect the remote computer. The first field is composed by a login followed by ’@’ and the hostname (could be an ip address). You can omit the login and in this case, the actual login of your shell session will be used.

The second field is a password to access the remote computer. It could be omitted if you exchanged ssh keys between the both computers.

The third field is the login you want to switch to after beeing connected to the remote computer. It could be omitted if you don’t need to switch.

The fourth and last field is the required password for the user switching. Could be omitted too.

You generate the connection script. You could use standard input but in our example we use –entree option to pinpoint the information file.

You launch the script and you reach the final computer.

Open a remote shell with several intermediate computers

Howto

We first write a file named “connections” with the following lines which defines information to access the final host:

Details

The first line of the information file defines the first intermediate computer to reach. On this one we also define a user switch.

The second line defines the second intermediate computer.

The third line defines the final computer. On this computer we switch to root.

The fourth line defines the command we want to execute on the final computer.

You generate the connection script. You could use standard input but in our example we use –entree option to pinpoint the information file.

You launch the script and you reach the final computer.

Open a tunnel for data while connecting to a host

Howto

We want to send a big file through several hosts. Copying it through the different hosts would be painful. Bélier offers an elegant solution to solve that case by opening on your source computer a network port sending data directly on the final machine you want to work on. By default this network port has the following number : 9999.

We first write a file named “connections” with the following lines which defines information to access the final host:

middlehost azer0;lp!z -t
admin@lasthost root jkw!po12;

Belier generates the script :

$ bel --entree=connections
$ ls
connections lasthost.sh

Details

Let’s be more verbose about this example :

That’s a pretty common order file but you have at the end of the line the -t (for tunnel) option, which means you want a data tunnel to this machine.

That’s pretty much what you need. executing this script you’ll connect and open a shell on the final host, as usual.

But moreover, you have on your source host an open port allowing you to send data directly to the final host, using the scp command.

Execution of the script (only the script is executed here, the other lines are self-generated) :

Your file has been successfully sent through every computers you usually have to cross! And you can use every command you want through this port, e.g ftp, rsync, whatever.

Open a tunnel for data with a specified port number while connecting to a host

Howto

We want to send a big file through several hosts. Copying it through the different hosts would be painful. Bélier offers an elegant solution to solve that case by opening on your source computer a network port sending data directly on the final machine you want to work on. By default this network port has the following number : 9999. lets take the following order file :

We first write a file named “connections” with the following lines which defines information to access the final host:

middlehost azer0;lp!z -ot
8888 7777
admin@lasthost root jkw!po12;

Belier generates the script :

$ bel --entree=connections
$ ls
connections lasthost.sh

Execution of the script (only the script is executed here, the other lines are self-generated) :