-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvps.sh.txt
112 lines (101 loc) · 5.24 KB
/
vps.sh.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#!/bin/bash
# create .ssh folder if missing
if [ ! -d ~/.ssh ]; then
echo Creating the ~/.ssh directory for SSH client configuration...
mkdir ~/.ssh
else
echo The ~/.ssh directory for SSH client configuration already exists.
fi
# create config file
echo Appending SSH connection configuration to ~/.ssh/config
cat << EOF >> ~/.ssh/config
################################################################################################
# oneAPI DevCloud SSH config
################################################################################################
Host devcloud
User u221930
IdentityFile ~/.ssh/devcloud-access-key-221930.txt
ProxyCommand ssh -T -i ~/.ssh/devcloud-access-key-221930.txt [email protected]
Host devcloud.proxy
User u221930
Port 4022
IdentityFile ~/.ssh/devcloud-access-key-221930.txt
ProxyCommand ssh -T devcloud-via-proxy
# If you must route outgoing SSH connection via a corporate proxy,
# replace PROXY_HOSTNAME and PORT below with the values provided by
# your network administrator.
Host devcloud-via-proxy
User guest
Hostname ssh.devcloud.intel.com
IdentityFile ~/.ssh/devcloud-access-key-221930.txt
LocalForward 4022 c009:22
ProxyCommand nc -x PROXY_HOSTNAME:PORT %h %p
################################################################################################
################################################################################################
# DevCloud VSCode config
################################################################################################
Host devcloud-vscode
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
Hostname localhost
User u221930
Port 5022
IdentityFile ~/.ssh/devcloud-access-key-221930.txt
################################################################################################
################################################################################################
# SSH Tunnel config
################################################################################################
Host *.aidevcloud
User u221930
IdentityFile ~/.ssh/devcloud-access-key-221930.txt
ProxyCommand ssh -T devcloud nc %h %p
LocalForward 5022 localhost:22
LocalForward 5901 localhost:5901
################################################################################################
EOF
# create private key file
echo Creating the private SSH key ~/.ssh/devcloud-access-key-221930.txt
echo Important: this file is your access key, keep it safe like you would a password.
cat << EOF > ~/.ssh/devcloud-access-key-221930.txt
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn
NhAAAAAwEAAQAAAYEAzcHCw1RK3BCKZbWf+yxAwssGecggpmClXE6pS7p6wgu1DGj2bNP4
CGwbafCmOYf4t16z2fFD6mlg+DcRAoL6weiC0fDH0t+0N6FOIn7MSqC+7WSw3fmUV3mQHT
4+9NgLanUmkwn2LD7XCS43IPMvdMQxedrM8w/DGtgh6ZnBN82TZW3t7ryxeCXNpB8crgF6
AES5OBUO1DzU1nVf8qUeKstNcW2gr+djtD3FrlM/Ubd+Rg/nnLsD50rr7R2dxfocfYlSuZ
fBOScGKwX396bpvtyhzARDFuYPaTIf6bYY2yp+SDl5q9z4I65fZ8pwNKMShE4H86X3eQhc
6AXiHJ+yOxX/gBS97I2MQMvKjmpv35qOibBuJ6+3QPY+pw2P98CiD27avVrBC4o4Td8J48
f+E/H84s7OWcAPlD2fh/oy5Dfa53YooYy+FkaUT7F25t4VMz/IgwVauCurDpGeJaldIcHt
C6xAats6ACJCyrkbfX0PnKu7m1RzXxa7zMeWttqdAAAFgNNHSajTR0moAAAAB3NzaC1yc2
EAAAGBAM3BwsNUStwQimW1n/ssQMLLBnnIIKZgpVxOqUu6esILtQxo9mzT+AhsG2nwpjmH
+Ldes9nxQ+ppYPg3EQKC+sHogtHwx9LftDehTiJ+zEqgvu1ksN35lFd5kB0+PvTYC2p1Jp
MJ9iw+1wkuNyDzL3TEMXnazPMPwxrYIemZwTfNk2Vt7e68sXglzaQfHK4BegBEuTgVDtQ8
1NZ1X/KlHirLTXFtoK/nY7Q9xa5TP1G3fkYP55y7A+dK6+0dncX6HH2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
zu/9w138BhUAGOry5mKmMCoUWMdijcfO2mDap+of20PHh+B0WRjDy/jOpMB30QUe9ujjhl
HlVh1gq/7zgBb2WfbhM3YHt5v6cKOILct3jl+0MePhTrl7O4TTfNlvM9VeJV2TCX2IUBwM
XVhzD0BVhCohmT1Le/l7YwW7T7JfZR5y4JXc5xOzvbP9VrTFgjyK2GKVDr1NeCvOGnySHD
ZR1K/hCranbWr4boEyDmi6IIFbtgsTzQAAAMEA94ABtlknP0NCTuNt86/W7ia637XAYUpa
DOBDJ39ZaeJTO+ZNRtKyxf7HU16G2ZtpsRw0J/Q0SebeEmyWi2nKcELhovaz8NR53G4mZC
Yyy2STRkOCvCndXKfTdFTgIKGX14YbNOm8GQdSG3X6VM9njFZjqPgX53wxaSPkWgYfQ58k
lflC1uuSMCyziILmaNu71srlRCN77u/hdRj0SooBW14jVx1uPPxTrC4fnvOcGYhM5AbqxI
0dg1CT86+TDrIRAAAAB3UyMjE5MzABAgM=
-----END OPENSSH PRIVATE KEY-----
EOF
# update permissions to the private key file
chmod 600 ~/.ssh/devcloud-access-key-221930.txt
echo Done! Now you can access Intel DevCloud by running 'ssh devcloud' or, if you are behind a proxy, 'ssh devcloud.proxy'