zxxx 大佬有话说 :
使用 SSH 连接 GitHub Action 服务器
本帖最后由 zxxx 于 2020-9-1 16:10 编辑
1. 在 ngrok 的官网注册一个账户
https://www.ngrok.com/
2. 查看 Authtoken
https://dashboard.ngrok.com/auth/your-authtoken
3. 在 GitHub 创建一个 Repo
4. 给 Repo 添加 Secrects
NGROK_TOKEN : 1gtVf———————-yVqbyAXX9
SSH_PASSWORD :ThisIsMySshServerPassword
5. 添加文件 ssh-server.sh 到 Repo
#!/bin/bash
if [[ -z "$NGROK_TOKEN" ]]; then
echo "Please set ‘NGROK_TOKEN’"
exit 2
fi
if [[ -z "$SSH_PASSWORD" ]]; then
echo "Please set ‘SSH_PASSWORD’ for user: $USER"
exit 3
fi
wget -q https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-386.zip
unzip ngrok-stable-linux-386.zip
chmod +x ./ngrok
echo -e "$SSH_PASSWORDn$SSH_PASSWORD" | sudo passwd "$USER"
rm -f .ngrok.log
./ngrok authtoken "$NGROK_TOKEN"
./ngrok tcp 22 –log ".ngrok.log" &
sleep 10
HAS_ERRORS=$(grep "command failed" < .ngrok.log)
if [[ -z "$HAS_ERRORS" ]]; then
echo ""
echo "To connect: $(grep -o -E "tcp://(.+)" < .ngrok.log | sed "s/tcp:///ssh $USER@/" | sed "s/:/ -p /")"
echo ""
else
echo "$HAS_ERRORS"
exit 4
fi
6. 创建 workflow:ssh-server.yml
name: SSH Server
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
– uses: actions/checkout@v2
– name: Failed
run: ./dummy.sh
– name: Start SSH Server
if: ${{ failure() }}
env:
NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }}
run: |
chmod +x ./ssh-server.sh &&./ssh-server.sh
– name: Sleep
if: ${{ failure() }}
run: sleep 1h
https://cdn.jsdelivr.net/gh/hishis/forum-master/public/images/patch.gif
zxxx 大佬有话说 :
本帖最后由 zxxx 于 2020-9-1 15:07 编辑
ssh [email protected] -p 17527
The authenticity of host ‘:17527 (:17527)’ can’t be established.
ECDSA key fingerprint is SHA256:v1Eaojx3SuZJSsLdFT+FDZl3iBzcEvtirxJJeQaOVrs.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘:17527,:17527’ (ECDSA) to the list of known hosts.
[email protected]’s password:
Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 5.3.0-1034-azure x86_64)
* Documentation:https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Tue Sep1 06:35:40 UTC 2020
System load:0.47 Processes: 151
Usage of /: 69.6% of 83.18GB Users logged in: 0
Memory usage: 14% IP address for eth0: 10.1.0.4
Swap usage: 0% IP address for docker0: 172.17.0.1
* Kubernetes 1.19 is out! Get it in one command with:
sudo snap install microk8s –channel=1.19 –classic
https://microk8s.io/ has docs and details.
* Canonical Livepatch is available for installation.
– Reduce system reboots and improve kernel security. Activate at:
https://ubuntu.com/livepatch
12 packages can be updated.
0 updates are security updates.
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
runner@fv-az71:/$ uname -a
Linux fv-az71 5.3.0-1034-azure #35~18.04.1-Ubuntu SMP Mon Jul 13 12:54:45 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
runner@fv-az71:/proc$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 63
model name : Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
stepping : 2
microcode : 0xffffffff
cpu MHz : 2397.222
cache size : 30720 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid: 0
fpu : yes
fpu_exception : yes
cpuid level : 15
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm invpcid_single pti fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt md_clear
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 4794.44
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 63
model name : Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
stepping : 2
microcode : 0xffffffff
cpu MHz : 2397.222
cache size : 30720 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid: 1
fpu : yes
fpu_exception : yes
cpuid level : 15
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm invpcid_single pti fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt md_clear
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 4794.44
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
runner@fv-az71:/$ df -h
Filesystem SizeUsed Avail Use% Mounted on
udev 3.4G 03.4G 0% /dev
tmpfs 696M984K695M 1% /run
/dev/sdb1 84G 58G 26G70% /
tmpfs 3.4G8.0K3.4G 1% /dev/shm
tmpfs 5.0M 05.0M 0% /run/lock
tmpfs 3.4G 03.4G 0% /sys/fs/cgroup
/dev/loop1 40M 40M 0 100% /snap/hub/43
/dev/loop0 97M 97M 0 100% /snap/core/9804
/dev/sdb15 105M3.6M101M 4% /boot/efi
/dev/sda1 14G4.1G9.0G32% /mnt
tmpfs 696M 0696M 0% /run/user/1001
runner@fv-az71:/$ free -h
total used free sharedbuff/cache available
Mem: 6.8G 501M 4.3G 26M 2.0G 6.0G
Swap: 4.0G 0B 4.0G
https://cdn.jsdelivr.net/gh/hishis/forum-master/public/images/patch.gif
zxxx 大佬有话说 :
runner@fv-az71:~$curl -sL yabs.sh | bash
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
# Yet-Another-Bench-Script #
# v2020-06-20 #
# https://github.com/masonr/yet-another-bench-script #
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
Tue Sep1 06:47:29 UTC 2020
Basic System Information:
———————————
Processor: Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
CPU cores: 2 @ 2397.222 MHz
AES-NI : ✔ Enabled
VM-x/AMD-V : ❌ Disabled
RAM : 6.8G
Swap : 4.0G
Disk : 97G
fio Disk Speed Tests (Mixed R/W 50/50):
———————————
Block Size | 4k (IOPS) | 64k (IOPS)
—— | — —-| —- —-
Read | 16.72 MB/s (4.1k) | 34.97 MB/s (546)
Write | 16.71 MB/s (4.1k) | 35.35 MB/s (552)
Total | 33.43 MB/s (8.3k) | 70.32 MB/s (1.0k)
| |
Block Size | 512k (IOPS) | 1m (IOPS)
—— | — —-| —- —-
Read | 34.04 MB/s (66) | 33.74 MB/s (32)
Write | 36.24 MB/s (70) | 36.57 MB/s (35)
Total | 70.29 MB/s (136) | 70.32 MB/s (67)
iperf3 Network Speed Tests (IPv4):
———————————
Provider | Location (Link) | Send Speed | Recv Speed
| | |
Bouygues Telecom | Paris, FR (10G) | 1.29 Gbits/sec| 2.33 Gbits/sec
Online.net | Paris, FR (10G) | 1.31 Gbits/sec| 2.34 Gbits/sec
WorldStream | The Netherlands (10G) | 823 Mbits/sec | 2.05 Gbits/sec
wilhelm.tel | Hamburg, DE (10G) | 1.23 Gbits/sec| 1.98 Gbits/sec
Biznet | Bogor, Indonesia (1G) | 256 Mbits/sec | 15.2 Mbits/sec
Hostkey | Moscow, RU (1G) | 854 Mbits/sec | 861 Mbits/sec
Velocity Online | Tallahassee, FL, US (10G) | 1.36 Gbits/sec| 2.85 Gbits/sec
Airstream Comms | Eau Claire, WI, US (10G)| 1.33 Gbits/sec| 3.60 Gbits/sec
Hurricane Electric | Fremont, CA, US (10G) | busy | busy
Geekbench 5 Benchmark Test:
———————————
Test | Value
|
Single Core | 715
Multi Core | 1401
Full Test | https://browser.geekbench.com/v5/cpu/3508973
zxxx 大佬有话说 :
本帖最后由 zxxx 于 2020-9-1 15:57 编辑
ssh [email protected] -p 17527
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: POSSIBLE DNS SPOOFING DETECTED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The ECDSA host key for :17527 has changed,
and the key for the corresponding IP address :17527
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:uZPVEk7PlOYFFru1JAeU9CORMMXVMN79opqJswO8vnw.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:1
remove with:
ssh-keygen -f "/root/.ssh/known_hosts" -R ":17527"
ECDSA host key for :17527 has changed and you have requested strict checking.
Host key verification failed.
backlitz 大佬有话说 :
用户权限可以安装软件吗?限制多少?
bugrun 大佬有话说 :
刚在公众号看到想发被你发了 https://i.loli.net/2020/09/01/IpeEc4OunmvkWRw.png
bugrun 大佬有话说 :
能搭网页服务器吗
Zeros 大佬有话说 :
为了世界和平,还是不弄了:lolhttps://cdn.jsdelivr.net/gh/hishis/forum-master/public/images/patch.gif
van 大佬有话说 :
这个可以自己安软件吗?
一颗赛艇 大佬有话说 :
白**大军正在赶来的路上…