HPC
Network inside the University
- Machines (linux)
- ==totoro is dead==, so I can not find it
- If I need some mechaine, I can get one, but I need to return to the office
- Machines (compute node)
- Must be attention about the password, the password was gave by HPC OFFICE
1
2ssh jrxie@ext.limos.fr -i C:\Users\jrxhi\Documents\00KEYS\isima-hpc.ppk -p 2225
ssh jrxie@frontalhpc.rcisima.isima.fr
- Must be attention about the password, the password was gave by HPC OFFICE
- Machines (linux)
Outside the University
登录网关 ext.limos.fr,需要ent的密码
jrxie@ext.limos.fr -i C:\Users\jrxhi\Documents\00KEYS\isima-hpc.ppk -p 2225``` 1
22. 登录实际的任务分发节点需要 limos给的密码
```ssh frontalhpc.rcisima.isima.fr添加如下配置文件
1
2
3
4
5Host hpc
User jrxie
Hostname frontalhpc.rcisima.isima.fr
IdentityFile \Users\jrxhi\Documents\00KEYS\isima-hpc.ppk
ProxyCommand C:\Windows\System32\OpenSSH\ssh.exe -p 2225 jrxie@ext.limos.fr
HPC2
Network inside the University
- From inside ISIMA, or connected to Eduroam WiFi network, or from any network inside the University, I should be able to connect to hpc2.mesocentre.uca.fr directly, using your login (jiaxie) and the password you chose on hub.mesocentre.uca.fr, be careful the password is at least 10 chars
jiaxie@hpc2.mesocentre.uca.fr``` 1
22. Outside the University
* In the cmder console :λ cd %HOME%
λ mkdir .ssh1
* In that newly created directory (```c:\users\<your windows login>\.ssh```), put your private and public keys ```(id_rsa and id_rsa.pub)```, and create a new file named config with the following contents :
Host hpc2-everywhere
User jiaxie
Hostname hpc2.mesocentre.uca.fr
ProxyCommand ssh -W %h:%p jiaxie@ext.mesocentre.uca.fr1
2* 特别注意config 中的==ssh==应该改为具体的地址:```C:\Windows\System32\OpenSSH\ssh.exe```, 因为如果不改为具体地址的话会报错误```CreateProcessW failed error:2 posix_spawn: No such file or directory```, 具体[链接](https://serverfault.com/questions/956613/windows-10-ssh-proxycommand-posix-spawn-no-such-file-or-directory)
* Check that your .ssh directory now contains 3 files :λ ls %HOME%.ssh
config id_rsa id_rsa.pub1
* Then, from cmder, you should be able to connect to hpc2 from any network just by typing "ssh hpc2-everywhere" :
λ ssh hpc2-everywhere
Last login: Wed Jan 29 09:28:24 2020 from 193.55.252.162
[dagrimbi@hpc2 ~]$1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23* 如果在使用ssh链接的过程中出现了错误,那么就果断使用```ssh ... -vvv``` 进行调试,查看错误信息
3. 我要骂人啊,它还不能自定义秘钥的位置,如果自定义了,就会产生one time password,搞事情嘛
#### Scp / Pscp
1. [Windows -> Linux](https://blog.51cto.com/hnyuanzijian/2344187)
* pscp -r -P 2225 ./00-jiaruixie/code jrxie@totoro:~
* pscp -r ./00-jiaruixie/code jrxie@ext.limos.fr:~
* pscp -r -P 2225 ./00-jiaruixie/code jrxie@192.168.100.42:~
* pscp -r -P 2225 -i ./isimahpc.ppk ./00-jiaruixie/code jrxie@192.168.100.42:~
* pscp -r -P 2225 -i ./isimahpc.ppk -pw h3BNetsw -v -l jrxie ./00-jiaruixie/code jrxie@192.168.100.42:/home/etud/jrxie/ensume
* pscp -r -P 2225 ./00-jiaruixie/code /home/jrxie@local.isima.fr:~/
* pscp -r -P 2225 ./00-jiaruixie/code jrxie@ext.limos.fr:~/
* pscp -r -P 2225 -i ./isimahpc.ppk -pw UCA123ent -v -l jrxie ./00-jiaruixie/code jrxie@ext.limos.fr:~
* pscp -r -P 2225 -i ./isimahpc.ppk -v ./00-jiaruixie/code jrxie@ext.limos.fr:~
#### WinSCP
1. HPC 与 HPC2均能够正常运行
#### VPN
1. 到Limos指定页下载并安装连接VPN,全程无难点
* 在连接时端口号为22,其余均不用更改
* ![](http://hexo-eu-1259148800.cos.eu-frankfurt.myqcloud.com/2020-02-28-203231.png)
2. 上传,一定要注意不要使用 ~ , 或者 ~/ 要如下一样给出正确的文件夹位置
``` pscp -r ./00-jiaruixie/code jrxie@totoro:/home/etud/jrxie/insp
下载
jrxie@totoro:/home/etud/jrxie/insp/code/01-ecm/ecm.m ./00-jiaruixie ``` 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
174. 可以看出不管是上传还是下载,都是在本地进行的;当然从server上应该也是可以的,但是没有进行测试;scp 、 pscp的使用没有什么困难的,直接参照网上的教程即可
#### 弊端
1. 使用VPN,不管是HPC1还是HPC2都不好用,可能是配置有问题,但是强烈建议首先使用SSH
2. Windows下的putty也不好用
#### 注意
1. ssh 不能用应该就是因为自己使用了 ``` rm -r ~ ```, 把本地密钥给删除了。
#### Inside the limos
1. Opening the terminal.
2. Typing:
```
ssh jrxie@totoroInputing the password, enjoying the HPC resources.
Outside the limos
Use ssh (perfer) or vpn.
Generate the ssh key pair. Send the public key to Mr. or Mrs. who charge for this.
You can use (1) to get all the valid options. Using (3) to get the debug log. Using (2) identify the path of the private key.
1
2
3ssh -help (1)
ssh -i PathOfPrivateKey (2)
-vvv (3)Typing
1
ssh jrxie@ext.limos.fr -p 2225 -i pathOfPrivateKey
Redo the steps prompted in “inside isima” session.
Under windows
You may encounter such problem “OpenSSH SSH-2 private key (old PEM format))”
Solution:
- regenerate the private key respect the Putty’s format.
Use PuttyGen
- use **jrxie@ext.limos.fr** instead of ext.limos.fr
HPC Server
- I can not access the Linux server brehat and yoshi by direct access (ssh).
- 连接到Linux系统服务器
ssh jrxie@totoro
以及SLURM计算节点网关ssh jrxie@frontalhpc
- Slurm 是一个开源、容错、高可伸缩的集群管理和大型小型 Linux集群作业调度系统。slurm不需要对操作系统内核进行修改,而是相对独立的。
- 不管登录 frontalhpc 还是 totoro,家目录,是透明的,即从这两个服务器上看到的都是相同的。
- Can not use
scp
on Mac neitherpscp
on Windows at home.- 不在Limos时,需要首先连接 ext.limos.fr 然后在其中再连接 totoro等,所以如果要上传文件,是否需要先上传到ext.limos,fr 然后再在其中上传到totoro等呢?
- 我进行了尝试,结果 公钥失效了 😳
- 嗯嗯,我的猜想是正确的,因为使用VPN后就能够上传文件了
How to use VPN in ISIMA
- go to https://doc.isima.fr/vpn/installation/ try to install the VPN
- go to https://doc.isima.fr/vpn/connection/ configure the connection with the username of the university
- use ssh connect to berzet
- ssh berzet -l jrxie
- exit
- After use the vpn, just disconnect.