Skip to content

Commit

Permalink
GITBOOK-126: change request with no subject merged in GitBook
Browse files Browse the repository at this point in the history
  • Loading branch information
twofaktor authored and gitbook-bot committed Jul 11, 2023
1 parent 88e0853 commit caec1f0
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 32 deletions.
56 changes: 35 additions & 21 deletions bonus/system/aliases.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,31 @@ Status: Tested MiniBolt

## Acknowledgments

The following list of aliases was derived from contributions by [RobClark56](https://github.com/robclark56) and [2FakTor](https://github.com/twofaktor).
The following list of aliases was derived from contributions by [RobClark56](https://github.com/robclark56) and [2FakTor](https://github.com/twofaktor)

## Set up aliases

* With user "admin", access to `home` folder and download the aliases list provided for a MiniBolt environment. ⚠️ This command will automatically overwrite the previous file you downloaded.
* With user `admin`, access to `home` folder and download the aliases list provided for a MiniBolt environment

{% code overflow="wrap" %}
```bash
$ cd /home/admin
```
{% endcode %}

{% code overflow="wrap" %}
```bash
$ wget https://raw.githubusercontent.com/minibolt-guide/minibolt/main/resources/.bash_aliases -O .bash_aliases
```
{% endcode %}

If you want, inspect the list of aliases to make sure it does not do bad things, and modify it with your personal aliases if you want. Exit with Ctrl-X

```sh
$ nano .bash_aliases --linenumbers
$ nano .bash_aliases
```

* Execute a `source` command to register changes of the `.bash_aliases` file in the .bashrc file
* Execute a `source` command to register changes of the `.bash_aliases` file in the `.bashrc` file

```sh
$ source /home/admin/.bashrc
Expand All @@ -72,29 +77,38 @@ $ nano .bash_aliases --linenumbers
alias enablefulcrum='sudo systemctl enable fulcrum'
[...]
```
* Test some of the aliases to see if it has been installed properly
* Test some of the aliases to see if it has been installed properly

```sh
$ showmainversion
> The installed versions of the services are as follows:
> Bitcoin Core version v23.0.0
> lnd version 0.15.3-beta commit=v0.15.3-beta
> BTC RPC Explorer: "version": "3.3.0",
> Electrs: v0.9.9
> RTL: "version": "0.12.3",
> Tor version 0.4.7.10.
> NPM: v8.15.0
> NodeJS: v16.17.1
> htop 3.0.5
> nginx version: nginx/1.18.0 (Ubuntu)
```
```sh
$ showmainversion
```

<details>

<summary>Example of expected output ⬇️</summary>

```
> The installed versions of the services are as follows:
> Bitcoin Core version v23.0.0
> lnd version 0.15.3-beta commit=v0.15.3-beta
> BTC RPC Explorer: "version": "3.3.0",
> Electrs: v0.9.9
> RTL: "version": "0.12.3",
> Tor version 0.4.7.10.
> NPM: v8.15.0
> NodeJS: v16.17.1
> htop 3.0.5
> nginx version: nginx/1.18.0 (Ubuntu)
```

</details>

## For the future: upgrade Aliases

Follow the [Set up Aliases](aliases.md#set-up-aliases) section again to overwrite aliases.
Follow again the [Set up Aliases](aliases.md#set-up-aliases) section again to overwrite aliases.

{% hint style="info" %}
You can see if the aliases have a recent update by entering [here](https://github.com/minibolt-guide/minibolt/commits/main/resources/.bash\_aliases).
You can see if the aliases have a recent update by entering [here](https://github.com/minibolt-guide/minibolt/commits/main/resources/.bash\_aliases)
{% endhint %}

## Uninstall
Expand Down
32 changes: 21 additions & 11 deletions bonus/system/trezor-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,31 @@ layout:

This project allows you to use various hardware security devices to operate GPG and SSH. Instead of keeping your key on your computer and decrypting it with a passphrase when you want to use it, the key is generated and stored on the device and never reaches your computer.

Difficulty: Easy {: .label .label-green }
{% hint style="success" %}
Difficulty: Easy
{% endhint %}

Status: Not tested MiniBolt {: .label .label-red }
{% hint style="warning" %}
Status: Not tested MiniBolt
{% endhint %}

It is possible to SSH to your device using your Trezor (It should be possible with Ledger and Keepkey but I haven't tried)

* Using romanz's trezor-agent [https://github.com/romanz/trezor-agent](https://github.com/romanz/trezor-agent){:target="\_blank"} and Trezor's documentation [https://wiki.trezor.io/Apps:SSH\_agent](https://wiki.trezor.io/Apps:SSH\_agent){:target="\_blank"}
* This Process is currently only available on Linux
* Install pre-requisites on your main machine:
* Using romanz's [trezor-agent](https://github.com/romanz/trezor-agent) and [Trezor's documentation](https://wiki.trezor.io/Apps:SSH\_agent)
* This process is currently only available on Linux
* Install pre-requisites on your main machine

{% code overflow="wrap" %}
```sh
$ sudo apt update && sudo apt install python3-pip libusb-1.0-0-dev libudev-dev pinentry-curses
```
{% endcode %}
* Install trezor-agent

```sh
$ pip3 install trezor_agent
```
* Set up udev rules on your machine: While your device is disconnected, open a file with nano and paste the udev rules. Save and exit.
* Set up udev rules on your machine: While your device is disconnected, open a file with nano and paste the udev rules. Save and exit

```sh
$ sudo nano /etc/udev/rules.d/51-trezor.rules
Expand All @@ -63,9 +69,9 @@ It is possible to SSH to your device using your Trezor (It should be possible wi
KERNEL=="hidraw*", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="53c1", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl"
```

Generate a public keys for 'admin' and 'root' users, when asked enter the pin of your trezor and a passphrase
Generate a public key for 'admin' and 'root' users, when asked enter the pin of your trezor and a passphrase

* You can use PASSWORD\[A], or come up with a diffrent passphrase
* You can use PASSWORD\[A], or come up with a different passphrase

```sh
$ trezor-agent [email protected]
Expand All @@ -92,12 +98,12 @@ Generate a public keys for 'admin' and 'root' users, when asked enter the pin of
$ cp -r /home/admin/.ssh .ssh
$ exit
```
* Exit from you pi
* Exit from your PC

```sh
$ exit
```
* SSH from your trezor as admin, enter pin and the password that you chosen
* SSH from your trezor as admin, enter the pin and the password that you have chosen

```sh
$ trezor-agent -c [email protected]
Expand All @@ -109,4 +115,8 @@ or as root
$ trezor-agent -c [email protected]
```

If the SSH succeeded go to your authorized keys file and delete/comment out all other public keys That's it, Now you can only SSH to your raspibolt using your trezor.
If the SSH succeeded go to your authorized keys file and delete/comment out all other public keys&#x20;

{% hint style="success" %}
That's it, now you can only SSH to your MiniBolt using your Trezor
{% endhint %}
4 changes: 4 additions & 0 deletions bonus/system/ups-nut.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ layout:

Have your MiniBolt safely shutdown when a connected UPS reaches a critical power level.

{% hint style="success" %}
Difficulty: Easy
{% endhint %}

{% hint style="warning" %}
Status: Not tested MiniBolt
{% endhint %}
Expand Down

0 comments on commit caec1f0

Please sign in to comment.