Cheatsheet - SkycoinProject/skywire GitHub Wiki
The following is just a simple list of
- explanations of the terminology that is being used
- commands with explanations that are useful for operating the Skyminer
- location of certain files related to the official images
It is permanently WIP so expect updates on a regular basis.
- The node process is responsible for the nodes you can see on the manager
- Not displayed by a specific button or anything like that. The node itself appears in the manager when the node process is running
- public key, stored in
.skywire/node/keys.json
- The sockss process is responsible for you being connected to the discovery address
- Displayed as the 'green node app' button inside the manager
- app key, stored in
.skywire/ss/keys.json
-
Check if manager process is running:
ps aux | grep manager
-
Restrict output to only return the PID + name:
ps aux | grep 'manager' | awk '{print $2, $11}'
The output should look something like (this is only an example, the PID might be different):
- 4825 ./manager - This is the manager process and 4825 is the PID number.
4833 ./node
26685 grep
-
Kill the manager process using the previously obtained PID:
sudo kill PID
, for examplesudo kill 4825
-
Manually start the manager process:
cd $GOPATH/bin
./skywire-manager -web-dir ${GOPATH}/src/github.com/SkycoinProject/skywire/static/skywire-manager
- Manually start the manager process and detach it from the terminal session:
cd $GOPATH/bin
nohup ./skywire-manager -web-dir ${GOPATH}/src/github.com/SkycoinProject/skywire/static/skywire-manager > /dev/null 2>&1 &sleep 3
-
Check if node process is running:
ps aux | grep skywire-node
-
Restrict output to only return the PID + name:
ps aux | grep 'skywire-node' | awk '{print $2, $11}'
-
Kill the node process using the previously obtained PID:
sudo kill PID
-
Manually start the node process:
cd $GOPATH/bin
./skywire-node -connect-manager -manager-address 127.0.0.1:5998 -manager-web 127.0.0.1:8000 -discovery-address testnet.skywire.skycoin.com:5999-028ec969bdeb92a1991bb19c948645ac8150468a6919113061899051409de3f243 -address :5000 -web-port :6001
- Manually start the node process and detach it from the terminal session:
cd $GOPATH/bin
nohup ./skywire-node -connect-manager -manager-address :5998 -manager-web :8000 -discovery-address testnet.skywire.skycoin.com:5999-028ec969bdeb92a1991bb19c948645ac8150468a6919113061899051409de3f243 -address :5000 -web-port :6001 > /dev/null 2>&1 &
-
Check if sockss process is running:
ps aux | grep sockss
-
Restrict output to only return the PID + name:
ps aux | grep 'sockss' | awk '{print $2, $11}'
-
Manually start the sockss process:
cd $GOPATH/bin
./sockss -node-address :5000
-
Kill the sockss process using the previously obtained PID:
sudo kill PID
-
Manually start the sockss process and detach it from the terminal session:
cd $GOPATH/bin
./sockss -node-address :5000 > /dev/null 2>&1 & echo $! > socks.pid
-
Check if sockss process is running:
ps aux | grep sshs
-
Restrict output to only return the PID + name:
ps aux | grep 'sshs' | awk '{print $2, $11}'
-
Manually start the sshs process:
cd $GOPATH/bin
./sshs -node-address :5000
- Manually start the sshs process and detach it from the terminal session:
cd $GOPATH/bin
./sshs -node-address :5000 > /dev/null 2>&1 & echo $! > sshs.pid
- get local IP:
hostname -I
- get gateway address:
netstat -nr
- get public IPv4:
curl v4.ifconfig.co
- ping website:
ping IP_or_website_name
- establish SSH connection:
ssh username@hostname
- establish SSH connection at a specific port:
ssh username@hostname -p portnumber
If you happen to encounter the error message Read from socket failed: connection reset by peer
then you need to open a terminal inside the Skywire manager on the affected node and exexute:
rm /etc/ssh/ssh_host_* dpkg-reconfigure openssh-server
This will delete the known hosts and reconfigure openSSH. Once that's done you should have access again and the backup script should work properly.
Basic commands can be found here
- Change working directory
cd
- create file:
touch filename
- create directory:
mkdir directory_name
- Keyword search to search for files/directories:
sudo find / -iname name_of_the_file_or_folder
- Simple listing of directory's content:
ls
- List hidden files too (they start with .filename):
ls -a
If you purchase a Skyminer from someone else, you are advised to delete the old Public Keys, create new ones and use them to update the miner in your account in the [Skywire Whitelisting System](https://whitelist.skycoin.com). Miners transfer are explained in this section of the [Skywire Whitelisting System Guide](https://github.com/SkycoinProject/skywire/wiki/Skywire-Whitelisting-System#transfer-miner).
The keys.json files which contains the Public Key for the node and/or App Keys are in a hidden directory called .skywire
.
The exact location of this folder will vary between official Skyminers and DIY Skyminers, and may also vary depending on which guide was followed during setup. If you are not sure where the .skywire
directory is located, you can easily find it with the command:
sudo find / -name .skywire
This will display the pathname of the directory. Possible locations could be:
/root/.skywire
/usr/local/skywire/go/bin/.skywire
/home/pi/.skywire
You can safely delete the entire .skywire
directory, this will remove all keys, and the next time the Skywire software starts it will generate new keys. Use the rm -r
command along with the full pathname.
Example commands matching the locations from above:
rm -r /root/.skywire
rm -r /usr/local/skywire/go/bin/.skywire
rm -r /home/pi/.skywire
If you need to scan your network for running boards you may use the Zenmap software which provides a GUI for the Nmap tool. Zenmap is available for all major operating systems . The provided commands in this guide are for Nmap but are not different in Zenmap.
First, obtain the subnet you want to scan by determining your local IP address. If you have trouble doing obtaining your local IP on your OS, use a search engine of your choice. The steps are very simple and easy to find.
Let's assume your local IP is 192.168.0.11 and you'd like to find other running devices in your network.
The command to scan the respective network would be nmap -sP 192.168.0.0/24
whereby 24
specifies the subnetmask. The output will be all currently running devices in your subnetwork. This will give you the IP addresses to proceed with accessing the board via SSH using a regular Mac/Linux terminal or Putty on Windows.
In this example, all IP addresses, starting from 192.168.0.0 up to 192.168.0.255 are being checked upon. There are cheat sheets on the internet that go into detail about the respective subnetmasks, generally, there is no need to exchange 24
.