Work in progress
This is a list of practical links and tricks in Unix environments in Telecom ParisTech.
You can also have a look at here for more information.
- Connect to a remote acces:
ssh [user]@[hostname]
For instance at TPT:
<login>@ssh.enst.fr
where \<login\> is generally the first letter of your first name followed by your last name (e.g. ngazagnadou for Nidham Gazagnadou).
- ssh login without password: well explained here.
- Mount files for remote acces: with sshfs to be done (for instance to print from a remote computer). Basic configuration is well explained here. Then it works exactly lke a Dropbox.
- Double-hop ssh: This can be usefull if you need to do 2 ssh in a row. First, download the ssh_multi_hop_config file and save it in ~/.ssh/config. Then, from a local non-DSI managed computer, one can access his TPT session by launching:
ssh tdsilinuxd103
Creating a double ssh proxy and creating a key pair to avoid typing your password every time:
- As explained in this answer, to create a ssh key pair run
ssh-keygen -t rsa
Use the default suggested path.
- Upload the public key on your remote machine
ssh-copy-id -i ~/.ssh/id_rsa.pub <login>@ssh.enst.fr
- Load the key into the ssh agent by running
ssh-add
Then you can easily ssh into the remote machine without password with the following command:
ssh <login>@ssh.enst.fr
Now you can configurate your ~:.ssh/config file to create shorcuts (see this link for easy examples). For instance if you sometimes want to connect to your remote account and some other times to one of the machines of your departement (let say lamexx)
- Open (create if needed)
~:.ssh/configand write
Host tpt
HostName ssh.enst.fr
User <login>
PubkeyAuthentication yes # this is to avoid typing your password everytime
Host lamexx
User <login>
ProxyCommand ssh -q tpt nc -q0 lamexx 22
- Then, you can run the following commands easily
ssh tpt # instead of ssh <login>@ssh.enst.fr
or
ssh lamexx # instead of ssh <login>@ssh.enst.fr and then ssh lamexx
For more information on ssh shortcuts and multi hop check this page.
- First of all have a look at the TPT help about printers.
- Try to install printers manually. For instance on Ubuntu 18.04 LTS :
Settings -> Devices -> Printers -> Additional Printer Settings. Then, try to fill in information and config files by using the Central_N_B.ppd and Central_Couleur.ppd files provided by TPT (see previous link).
I recommend to use jemdoc which creates a very sober website.
- Step 1: download
jemdoc.pyat: http://jemdoc.jaboc.net/download.html
WARNING: if default python on your computer is not a 2.x version you may need to precise a python version in the first line of jemdoc.py. For instance:
#!/usr/bin/env python2.7
- Step 2: make it executable by running
chmod +x jemdoc.py
- Step 3: put it into your
PATHfor ease of use:
sudo cp jemdoc.py /usr/bin/jemdoc
- Step 4: download the example css and index page respectively at http://jemdoc.jaboc.net/dist/jemdoc.css and http://jemdoc.jaboc.net/index.jemdoc
For more detailed information you can check: http://jemdoc.jaboc.net/
In order to host your website on your personal Télécom ParisTech page.
- Step 1: activate your personal webpage from your account. Go on:
https://moncompte.telecom-paristech.fr/mon_compte/
In section
Page web personnelle, underService page persoclick on the drop-down menu and selectService Web Apache 2.4 avec PHP 7 (basé sur Débian 9)Your website is now available at:
https://perso.telecom-paristech.fr/<login>
- Step 2: now you may want to put your website files (HTML, CSS, etc) into the dedicated folder. The easiest way to proceed is to mount the remote repository. Open a terminal on a computer at TPT and run:
mkdir ~/perso_www
sshfs <login>@perso-<login>.lxc.enst.fr:/home/<login>/www/ ~/perso_www
WARNING: save all your files in a local folder, eg perso_www_local, and whenever your want to modify recreate a new and EMPTY ~/perso_www folder and mount it. This avoids from erasing all your local work with a hazardous
sshfs -o nonempty <login>@perso-<login>.lxc.enst.fr:/home/<login>/www/ ~/perso_www
like I did in the first place...
- Step 3: put all your website files and subfolders into perso_www on your local machine and your done!
WARNING: you may face a problem deleting the previous index.html file from your local computer. I solved this issue by connecting to my remote website repository /home//www/ by ssh running:
ssh <login>@perso-<login>.lxc.enst.fr
cd www
And then deleted the symbolic link
rm index.html
To avoid entering your credentials everytime you push updates to your github repository try to apply the first (and validated) answer here
Remark: the procedure might have to be executed on each repository.