Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente |
tools:ssh [2020/02/17 16:24] – webersa | tools:ssh [2020/02/17 16:37] (Version actuelle) – webersa |
---|
<note>SSH is an internet protocol that lets you connect to a remote computer, for instance your lab's computer :)</note> | <note>SSH is an internet protocol that lets you connect to a remote computer, for instance your lab's computer :)</note> |
| |
There is a [[https://intragere.univ-grenoble-alpes.fr/IntraGere?CODE=0J2P$FfD1F105|doc]] in intragere. | There is a [[https://intragere.univ-grenoble-alpes.fr/IntraGere?CODE=0J2P$FfD1F105|doc]] in intragere, quickly summarized for *NIX environment hereafter. |
| |
First, you have to know the IP addresse of your computer: | First, you have to know the IP adresse of your computer. In a terminal, enter |
| |
ip a | ip a |
| |
should return something like | It should return something like |
| |
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 | 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 |
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 | link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 |
inet 127.0.0.1/8 scope host lo | inet 127.0.0.1/8 scope host lo |
valid_lft forever preferred_lft forever | valid_lft forever preferred_lft forever |
inet6 ::1/128 scope host | inet6 ::1/128 scope host |
valid_lft forever preferred_lft forever | valid_lft forever preferred_lft forever |
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 | 2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 |
link/ether 34:64:a9:d1:2c:fb brd ff:ff:ff:ff:ff:ff | link/ether 34:64:a9:d1:2c:fb brd ff:ff:ff:ff:ff:ff |
inet 152.77.132.162/24 brd 152.77.132.255 scope global dynamic enp0s25 | inet 152.77.132.162/24 brd 152.77.132.255 scope global dynamic enp0s25 |
valid_lft 28304sec preferred_lft 28304sec | valid_lft 28304sec preferred_lft 28304sec |
inet6 fe80::3664:a9ff:fed1:2cfb/64 scope link | inet6 fe80::3664:a9ff:fed1:2cfb/64 scope link |
valid_lft forever preferred_lft forever | valid_lft forever preferred_lft forever |
3: wlo1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 | 3: wlo1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 |
link/ether be:a0:2c:8f:12:ec brd ff:ff:ff:ff:ff:ff | link/ether be:a0:2c:8f:12:ec brd ff:ff:ff:ff:ff:ff |
| |
We are looking for the ethernet adresse (namely ''enp0s5'' in this case, but could be ''eth0'' or other): ''152.77.132.162'' (it should start with ''152.77.'') | We are looking for the ethernet adresse (namely ''enp0s5'' in this case, but could be ''eth0'' or other): ''152.77.132.162'' (it should start with ''152.77.'') |
| |
| |
Then, the IGE use a ssh passerelle, so we need to use it each time. For instance, with this config in ''~/.ssh/config'' | Then, the IGE use a ssh passerelle, so we need to use it each time. For instance, with this config in ''~/.ssh/config'' (replace //login// by your login): |
| |
Host 152.77.132.162 | Host 152.77.132.162 |
ProxyCommand nohup ssh login@ssh.ige-grenoble.fr nc -w1 %h %p | ProxyCommand nohup ssh login@ssh.ige-grenoble.fr nc -w1 %h %p |
| |
With a Mac, you have to open the connection (by typing apple+K from a Finder windows) to | Then, to open a ssh connection, in a terminal enter: |
| |
<code>smb://ige;loginintragere@129.88.191.37/equipes/ | ssh login@152.77.132.162 |
</code> | |
| |
To open the connection with ssh: ssh login@ssh.ige-grenoble.fr | <note tip>You may want to setup an ssh key in order not to enter your password every time... There are plenty of tutorial on how to do it (https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys-on-debian-10 for instance).</note> |
| |
The use of the Cisco VPN is required to avoid security issues when working from outside the lab (connection with vpn.grenet.fr, as "personnel de l'UGA" and login+passwd intragere) | |
| |