去中心化开源web ssh工具nshell

https://nsh.nkn.org/

安装过程记录

外文参考
https://www.digitalocean.com/community/tutorials/how-to-use-nsh-to-run-secure-remote-commands-on-ubuntu-18-04

在ubuntu18.04服务器上vps
下载
wget https://github.com/nknorg/nkn-shell-daemon/releases/latest/download/linux-amd64.tar.gz
解压
tar -zxvf linux-amd64.tar.gz
移动
sudo mv ./linux-amd64/* /usr/local/bin/
自启动编辑
sudo nano /etc/systemd/system/nshd.service
输入内容
[Unit]
Description=NKN Shell Daemon
After=network.target

[Service]
Type=simple
User=root
Group=root
Restart=always
ExecStart=/usr/local/bin/nshd

[Install]
WantedBy=multi-user.target

启用服务
sudo systemctl enable nshd.service
sudo systemctl start nshd.service

查看启动状态
sudo systemctl status nshd.service

结果
Feb 19 19:16:02 your_hostname systemd[1]: Started NKN Shell Daemon.
Feb 19 19:16:03 your_hostname nshd[3457]: Create directory /etc/nshd/
Feb 19 19:16:03 your_hostname nshd[3457]: Create password and save to file /etc/nshd/wallet.pswd
Feb 19 19:16:03 your_hostname nshd[3457]: Create wallet and save to file /etc/nshd/wallet.json
Feb 19 19:16:03 your_hostname nshd[3457]: Create authorized pubkeys file /etc/nshd/authorized_pubkeys

查看你的密码
/etc/nshd/

查看你的地址
nshd addr
6c55bd55a1dbcd35e35c8f178fd2d8264a2b79d4708df161814178f862341dae
客户端部分
你可以使用在线工具
https://nsh.nkn.org/
或者chrome插件
https://chrome.google.com/webstore/detail/nshell/jeiiodgaanmdeechnildbmhgpikbfokd?hl=en-US

第二个按钮 生成 新的 seed和 pubickey

Secret Seed: 8f64641a49ffbb64da523324533723125243d83d41ea5bd1a4de88e3e6628a0e
Public Key: 2855e06d0a34ad67f8d8e4d97ffbbcca9b35bd6bd97e4f1ffb771cec5f156048
然后把Public Key写入这个文件 后面加两个1000是用户的uid
sudo nano /etc/nshd/authorized_pubkeys

2855e06d0a34ad67f8d8e4d97ffbbcca9b35bd6bd97e4f1ffb771cec5f156048

重启
sudo systemctl restart nshd.service

点赞

发表评论

电子邮件地址不会被公开。必填项已用 * 标注