Access to the Télécom ParisTech network.
Notations
I will use <username>
to denote the LDAP username, and <password>
the corresponding password.
In my case, then I have the following:
SSH Access
Out-of-the-box access
You can use this script to access shells from Télécom ParisTech machines.
The code is not perfect and could be improved, dont hesitate to write comments on the github page if you have suggestions.
Please note that basic help is available by executing ./ssh.sh -h
.
Shell access
Simple shell access can be performed through ssh.enst.fr
.
You will end up randomly on ssh1
or ssh2
(with your same old home folder whatever the machine).
Access to a computer
You can access any computer in a lab, provided it is switched on. The examples will be made with c129-21
, i.e., computer 21 from room 129 in the C building.
Direct access
To avoid having to call every ssh command, and easily add new rooms to your configuration, you can edit your ssh
config file (generally found in ~/.ssh/config
).
Code
1
2
3
4
5
6
7
8
9
+Host enst room
+ User <username>
+
+Host enst
+ HostName ssh.enst.fr
+
+Host room
+ HostName c129-21.enst.fr
+ ProxyCommand ssh -W %h:%p enst
Using a key
Using a key avoids having to type the password every time and is more secure.
You can (if you don’t already have one) generate a key. If you do not trust your computer’s safety or if you intend to use this key for critical accesses, please make sure not to use an empty passphrase.
Code
Then you have to copy the public key to Télécom. Do not copy this file manually, use ssh-copy-id
as below.
Code
Finally, make sure that your ssh config file always use the right key by modifying ~/.ssh/config
as follows.
Code
1
2
3
4
5
6
7
8
9
10
Host enst room
User <username>
+ IdentityFile ~/.ssh/id_ecdsa
Host enst
HostName ssh.enst.fr
Host room
HostName c129-21.enst.fr
ProxyCommand ssh -W %h:%p enst
Now, connection to room
should be rather direct.
Accessing graphical interfaces
Graphical interfaces access can be tricky when you have to go through an
intermediate server (here, enst
or ssh.enst.fr
). The configuration file
however allows you to do this pretty easily. Now that you configured everything
you can easily access graphical interfaces of room
.
Tunnelling
A basic use-case of tunnels is getting access to scientific paper websites like IEEE.
Assuming that you configured your ssh client, you should be able to open a socks proxy:
Do not close this terminal, then configure your web browser to use the SOCKS5 proxy
127.0.0.1:8080
. On firefox, this is found in the Preferences
page, Advanced
section, under the Network
tab. There is a Settings
button to setup how Firefox
connects to the Internet, and it includes a proxy configuration.
More information about SSH connections and tunnels can be found in this article or on the web.