You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
n4n5 a00722acf4 luckier 9 months ago
README.md luckier 9 months ago

README.md

useful-commands

Some useful command @ TP

Connect to TP

username="remplir-21"
sshServer="ssh.enst.fr"
tp="${username}@${sshServer}"
ssh $tp
# ssh remplir-21@ssh.enst.fr

Download a file from TP

Files are on a zfs server

username="remplir-21"
sshServer="ssh.enst.fr"
tp="${username}@${sshServer}"
scp "${tp}:/cal/exterieurs/${username}/Downloads/myFile" ./
# scp "remplir-21@ssh.enst.fr:/cal/exterieurs/remplir-21/Downloads/myFile" ./

Legend :

  • change the path /Downloads/myFile

SSH to machine on TP with X fowarding

username="remplir-21"
sshServer="ssh.enst.fr"
tp="${username}@${sshServer}"
machine="tp-1a201-15" # change or not
ssh -Y "${username}@${machine}" -J "$tp"
# ssh -Y remplir-21@tp-1a201-15 -J remplir-21@ssh.enst.fr

Legend :

  • -J : This is a shortcut to specify a ProxyJump configuration directive (man ssh)
  • Pour voir les machines disponibles : https://tp.telecom-paris.fr/

LXC of DSI

Activate here : https://moncompte.telecom-paris.fr/mon_compte/#perso

SSH from ext

username="remplir-21"
sshServer="ssh.enst.fr"
tp="${username}@${sshServer}"
lxc="${username}@perso-${username}.lxc.enst.fr"
ssh -Y "$lxc" -J "$tp"

SSH from TP

username="remplir-21"
lxc="${username}@perso-${username}.lxc.enst.fr"
ssh -Y "$lxc"

SCP from ext

username="remplir-21"
sshServer="ssh.enst.fr"
tp="${username}@${sshServer}"
scp -o ProxyJump="${tp}" myFile.pdf "${username}@perso-${username}.lxc.enst.fr:/home/${username}/www/"

Running command in background with zsh

mycommand &!