Bitcoin Forum
December 11, 2019, 09:34:44 PM *
News: Latest Bitcoin Core release: 0.19.0.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 5 »  All
  Print  
Author Topic: Questions RE: setting up Lightning Node on Raspberry Pi with Stadicus' guide  (Read 21802 times)
Zand_
Member
**
Offline Offline

Activity: 112
Merit: 17


View Profile
October 03, 2018, 06:30:08 PM
Last edit: October 15, 2018, 02:57:55 PM by Zand_
Merited by DarkStar_ (2), LoyceV (1)
 #1

I'm in the process of setting up a Bitcoin/Lightning node on a Raspberry Pi following Stadicus' walkthough and have some pretty rudimentary questions (since I've never used Linux or a Raspberry Pi before). Link to the guide is below...

https://github.com/Stadicus/guides/blob/master/raspibolt/README.md

First question is really simple, I'm almost embarrassed to ask but I had no luck finding an answer on google. Under the "Raspberry Pi" > "Mounting external hard disk" section of the guide, it instructs us to "Edit the fstab file and the following as a new line (replace UUID=123456) at the end." He does this by putting in the following command line (this is all being done in a CMD window through a SSH client, in this case PuTTY)...

sudo nano /etc/fstab
UUID=123456 /mnt/hdd ext4 noexec,defaults 0 0


As you can see there are two separate lines, how do I add the second line in PuTTY so both commands execute at the same time? I tried using the "^" symbol after the first line but that didn't seem to work.

I'm sure I'll have more questions as I get deeper into the guide but this is currently what I'm stuck on. Any help would be much appreciated
!

Appreciate the help. I finally got past that step and am now stuck again with a new problem. Under "Raspberry Pi" > "Login with SSH keys" it instructs us to use private key encryption to login to our Pi and provides the following guide:

https://www.tecmint.com/ssh-passwordless-login-with-putty/

I followed everything without any issues until getting to Step 8, which shows how to login to our Pi with the private key. It gives the following instructions:

"Open Putty and add your server login user followed by your server IP Address or FQDN on Host Name field in the form of user@domain.tld, enter your server SSH Port number if it was changed."

Assuming my servin login user is "admin" and the server IP address is 192.168.1.2, would I be putting admin;192.168.1.2 into the "Host Name" field? I tried just using the IP address and loading the private key but the SSH window opens blank and doesn't allow me to type anything. Once again, any help would be much appreciated! Would really like to get this thing up and running


I've been cruising through the rest of the guide but just hit another road block (under Lightning > Assign LND permissions to "admin"). It asks us to check to see if files admin.macaroon and readonly.macaroon have been created by using the following command

ls -la /home/bitcoin/.lnd/

When I execute this command I get everything in the screenshot except those two files. Do I have to wait for them to be created or am I doing something wrong?


I was able to get testnet fully operation and have started the migration process to mainnet. For some reason I'm having a hard time unlocking my LND wallet. Under "Mainnet > Restart bitcoind & lnd for mainnet" it has us create a new LND wallet using same password as testnet. Followed these steps without any issues but for some reason when I restart and unlock my wallet, I get the following error message

[lncli] rpc error: code = Unknown desc = wallet not found

Any ideas?


Update: Node is fully operational and live on mainnet. Thank you for all the help!
1576100084
Hero Member
*
Offline Offline

Posts: 1576100084

View Profile Personal Message (Offline)

Ignore
1576100084
Reply with quote  #2

1576100084
Report to moderator
1576100084
Hero Member
*
Offline Offline

Posts: 1576100084

View Profile Personal Message (Offline)

Ignore
1576100084
Reply with quote  #2

1576100084
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1576100084
Hero Member
*
Offline Offline

Posts: 1576100084

View Profile Personal Message (Offline)

Ignore
1576100084
Reply with quote  #2

1576100084
Report to moderator
1576100084
Hero Member
*
Offline Offline

Posts: 1576100084

View Profile Personal Message (Offline)

Ignore
1576100084
Reply with quote  #2

1576100084
Report to moderator
Carlton Banks
Legendary
*
Offline Offline

Activity: 2576
Merit: 2114



View Profile
October 03, 2018, 06:49:51 PM
Last edit: October 09, 2018, 10:08:00 PM by Carlton Banks
Merited by suchmoon (4), LoyceV (1), Jet Cash (1)
 #2

As you can see there are two separate lines, how do I add the second line in PuTTY so both commands execute at the same time? I tried using the "^" symbol after the first line but that didn't seem to work.

That's not what the guide means.

nano is a text file editor, like... the Windows file editor (which I can't even remember the name of).

The line
Code:
UUID=123456 /mnt/hdd ext4 noexec,defaults 0 0

is supposed to be inserted into the fstab file. Probably at the end of the file, but you should check the implications of that beforehand. It's not a command, it's a config value.

And you need to use fdisk (or suchlike command) to discover the actual UUID for your external disk, and replace "123456" with that.

Vires in numeris
Zand_
Member
**
Offline Offline

Activity: 112
Merit: 17


View Profile
October 03, 2018, 06:53:27 PM
 #3

As you can see there are two separate lines, how do I add the second line in PuTTY so both commands execute at the same time? I tried using the "^" symbol after the first line but that didn't seem to work.

That's not what the guide means.

nano is a text file editor, like... the Windows file editor (which I can't even remember the name of)

The line
Code:
UUID=123456 /mnt/hdd ext4 noexec,defaults 0 0

is supposed to be inserted into the fstab file. Probably at the end of the file, but you should check the implications of that beforehand.

And you need to use fdisk (or suchlike command) to discover the actual UUID for your external disk, and replace "123456" with that.

I already have the UUID of my hard disk, I know to replace the "123456" with it. I'm confused about the first part though. Where/how do I access the fstab file? Is this something done in PuTTY or somewhere else?
BitCryptex
Hero Member
*****
Online Online

Activity: 784
Merit: 1114


Write @BitCryptex or quote my post to notify me


View Profile WWW
October 03, 2018, 06:54:06 PM
 #4

As you can see there are two separate lines, how do I add the second line in PuTTY so both commands execute at the same time?

You got that wrong. What the author of the tutorial actually does, is opening a file (sudo nano etc/fstab) and then replacing "UUID=123456" manually. CTRL + O lets you save the file.

You can try this automatic installer if you find it too difficult to install it on your own.

Where/how do I access the fstab file? Is this something done in PuTTY or somewhere else?

Yes, you have to use nano which is a text editor as a person above mentioned. Use "sudo nano /etc/fstab" and save your file using CTRL + O.

Carlton Banks
Legendary
*
Offline Offline

Activity: 2576
Merit: 2114



View Profile
October 03, 2018, 08:37:41 PM
 #5

I already have the UUID of my hard disk, I know to replace the "123456" with it. I'm confused about the first part though. Where/how do I access the fstab file? Is this something done in PuTTY or somewhere else?

fstab file is in the directory /etc/, so sudo nano /etc/fstab should open the fstab file in the nano editor. If it doesn't, then maybe that's because PuTTY won't let you use nano for some reason. You should see the contents of the fstab file when you execute sudo nano /etc/fstab . If not, you should get an error message of some kind.

Vires in numeris
Zand_
Member
**
Offline Offline

Activity: 112
Merit: 17


View Profile
October 04, 2018, 01:56:38 AM
Merited by Jet Cash (1)
 #6

Appreciate the help. I finally got past that step and am now stuck again with a new problem. Under "Raspberry Pi" > "Login with SSH keys" it instructs us to use private key encryption to login to our Pi and provides the following guide:

https://www.tecmint.com/ssh-passwordless-login-with-putty/

I followed everything without any issues until getting to Step 8, which shows how to login to our Pi with the private key. It gives the following instructions:

"Open Putty and add your server login user followed by your server IP Address or FQDN on Host Name field in the form of user@domain.tld, enter your server SSH Port number if it was changed."

Assuming my servin login user is "admin" and the server IP address is 192.168.1.2, would I be putting admin;192.168.1.2 into the "Host Name" field? I tried just using the IP address and loading the private key but the SSH window opens blank and doesn't allow me to type anything. Once again, any help would be much appreciated! Would really like to get this thing up and running
BitCryptex
Hero Member
*****
Online Online

Activity: 784
Merit: 1114


Write @BitCryptex or quote my post to notify me


View Profile WWW
October 04, 2018, 07:14:37 AM
Merited by Jet Cash (1)
 #7

Assuming my servin login user is "admin" and the server IP address is 192.168.1.2, would I be putting admin;192.168.1.2 into the "Host Name" field? I tried just using the IP address and loading the private key but the SSH window opens blank and doesn't allow me to type anything. Once again, any help would be much appreciated! Would really like to get this thing up and running

Your problem is that your system doesn't know as which user you are trying to log in. The solution is quite simple. Enter "USERNAME@192.168.1.2" in the host name, add your keys and save your session again.

Zand_
Member
**
Offline Offline

Activity: 112
Merit: 17


View Profile
October 04, 2018, 12:25:11 PM
 #8

Assuming my servin login user is "admin" and the server IP address is 192.168.1.2, would I be putting admin;192.168.1.2 into the "Host Name" field? I tried just using the IP address and loading the private key but the SSH window opens blank and doesn't allow me to type anything. Once again, any help would be much appreciated! Would really like to get this thing up and running

Your problem is that your system doesn't know as which user you are trying to log in. The solution is quite simple. Enter "USERNAME@192.168.1.2" in the host name, add your keys and save your session again.

I tried that and had the same problem. PuTTY window opens blank and then eventually get a message "Network error: Connection timed out"
Carlton Banks
Legendary
*
Offline Offline

Activity: 2576
Merit: 2114



View Profile
October 04, 2018, 01:29:42 PM
 #9

I tried that and had the same problem. PuTTY window opens blank and then eventually get a message "Network error: Connection timed out"

Which user did you choose? You should probably choose "root". For that, you'll need whatever the default password is for the root user on Debian (possibly the password is literally "root", but that's a guess). Search for "default Debian root password" maybe.

Vires in numeris
Zand_
Member
**
Offline Offline

Activity: 112
Merit: 17


View Profile
October 04, 2018, 02:39:15 PM
 #10

I tried that and had the same problem. PuTTY window opens blank and then eventually get a message "Network error: Connection timed out"

Which user did you choose? You should probably choose "root". For that, you'll need whatever the default password is for the root user on Debian (possibly the password is literally "root", but that's a guess). Search for "default Debian root password" maybe.

I chose the user “admin” which is what I’d been using for the rest of the setup. So for host name I put admin@192.168.1.2 and then loaded the private key. Where would I enter the password? I don’t see a field for it
BitCryptex
Hero Member
*****
Online Online

Activity: 784
Merit: 1114


Write @BitCryptex or quote my post to notify me


View Profile WWW
October 04, 2018, 07:03:33 PM
 #11

I tried that and had the same problem. PuTTY window opens blank and then eventually get a message "Network error: Connection timed out"

I followed the tutorial on my VPS and everything works fine. If this was a problem with the key configuration, you would get a "Server refused our key" error. Are you sure that you have put a public key in ".ssh/authorized_keys"? Make sure that your router hasn't changed the local IP of your Raspberry Pi. It may happen if you didn't configure it to be persistent.

Zand_
Member
**
Offline Offline

Activity: 112
Merit: 17


View Profile
October 04, 2018, 09:41:17 PM
 #12

I tried that and had the same problem. PuTTY window opens blank and then eventually get a message "Network error: Connection timed out"

I followed the tutorial on my VPS and everything works fine. If this was a problem with the key configuration, you would get a "Server refused our key" error. Are you sure that you have put a public key in ".ssh/authorized_keys"? Make sure that your router hasn't changed the local IP of your Raspberry Pi. It may happen if you didn't configure it to be persistent.


IP definitely hasn't changed since I set a static IP for the Pi. I'm positive I put the public key in ".ssh/authoized_keys" but maybe it didn't save? Is there anyway to go back in and check or am I locked out? Another thing I noticed was the guide stated we should have 3 files at this point; the public key, private key, and the authorized key text file. Right now I have everything but the text file. Is the text file just where we pasted the public key from PuTTYgen or is this something else?
BitCryptex
Hero Member
*****
Online Online

Activity: 784
Merit: 1114


Write @BitCryptex or quote my post to notify me


View Profile WWW
October 04, 2018, 09:53:24 PM
 #13

Another thing I noticed was the guide stated we should have 3 documents at this point; the public key, private key, and the authorized key text file. Right now I have everything but the text file. Is the text file just where we pasted the public key from PuTTYgen or is this something else?

I don't have a text file either. You should still be able to access your Raspberry Pi by simply typing in only IP address in the host name. Use "nano .ssh/authorized_keys" to access your saved keys. Save it using CTRL + O. I copied my public key from the window in which I had to move a cursor a bit.

Zand_
Member
**
Offline Offline

Activity: 112
Merit: 17


View Profile
October 04, 2018, 09:56:00 PM
Last edit: October 04, 2018, 10:25:38 PM by Zand_
 #14

Another thing I noticed was the guide stated we should have 3 documents at this point; the public key, private key, and the authorized key text file. Right now I have everything but the text file. Is the text file just where we pasted the public key from PuTTYgen or is this something else?

I don't have a text file either. You should still be able to access your Raspberry Pi by simply typing in only IP address in the host name. Use "nano .ssh/authorized_keys" to access your saved keys. Save it using CTRL + O. I copied my public key from the window in which I had to move a cursor a bit.

Appreciate the quick response. Unfortunately I'm no longer able to access my Pi by just using the IP address. I get the same error message I mentioned previously, "Network error: Connection timed out"

Hopefully this doesn't mean I have to start from scratch

Update: I just wiped the SD card with SDFormatter and rewrote the "Raspberry Pi Lite" disk image back onto the SD hoping to start from the beginning. When I tried logging into the Pi from PuTTY with my static IP I got a different error message, this time "Network error: Connection refused"... Any ideas?  Huh
Carlton Banks
Legendary
*
Offline Offline

Activity: 2576
Merit: 2114



View Profile
October 04, 2018, 11:05:07 PM
 #15

The first thing I'd do is try pinging the IP of the Pi and other devices on your home network, it sounds like the problem is to do with your router

Vires in numeris
Zand_
Member
**
Offline Offline

Activity: 112
Merit: 17


View Profile
October 04, 2018, 11:06:38 PM
Last edit: October 04, 2018, 11:21:58 PM by Zand_
Merited by Jet Cash (1)
 #16

The first thing I'd do is try pinging the IP of the Pi and other devices on your home network, it sounds like the problem is to do with your router

Already tried pinging, it's working fine

Edit: Nevermind, forgot to recreate the "ssh" file in the boot drive of my MicroSD. I'm back in and going to give this whole thing another whirl, I'll keep you guys posted.
Carlton Banks
Legendary
*
Offline Offline

Activity: 2576
Merit: 2114



View Profile
October 04, 2018, 11:22:23 PM
 #17

That sounds off.

If you've reflashed the Debian image, there's no conceivable reason that pinging the Pi works, yet SSH login won't. Either the ethernet hardware on your Pi works or it doesn't. Are you using ethernet, or wifi?



Cool. I hope you get it working, this is all good experience you're building up.

Vires in numeris
Zand_
Member
**
Offline Offline

Activity: 112
Merit: 17


View Profile
October 05, 2018, 01:37:37 AM
 #18

Well I gave it another shot and ran into the same problem. Keep getting "Network error: Connection timed out" after setting up the public key in the .ssh/authorized_keys nano folder. I'm wondering if I'm somehow entering the public key wrong? Here is the step by step breakdown...

mkdir .ssh
nano .ssh/authorized_keys


Once this opened I added the public key, saved by hitting Ctrl + O, enter, and then exiting with Ctrl + X. Below is an example of the public key I put in, I'm wondering if I was supposed to include the entire string? For example, at the very end it has the nickname I gave the key "LightNode Keys". Should I omit that?

2048 37 2926877905057611927715148755727399686143855056397930910268176155544486039903026 9544216676050916922797437140181990936326704389571868101556788023723768028376095 5286411580936916507661787551554794150308211487587558445878082396130423946260024 8111988870557270960212891785752620587821289007077391612815577729744490956103657 8035117814798023232369059318931194448904566627840072531959805969875272348281735 9168228175348840554340892749717238557819322595421624901736023679109546926141029 5819236374715075005051553089587916223334468614057099430914344001508210336312229 0965589886136372605871099014869596718038391900923041721911870683 LightNode Keys

After I saved and exited, I entered the following commands...

chmod -R 700 .ssh/ (Nothing happened after doing this)
exit


Really not sure what to do at this point. How critical is this step? I'm thinking of just skipping it altogether but of course don't want to leave my node vulnerable.
bob123
Legendary
*
Offline Offline

Activity: 1106
Merit: 1580



View Profile WWW
October 05, 2018, 05:46:11 AM
Merited by Jet Cash (1)
 #19

Once this opened I added the public key, saved by hitting Ctrl + O, enter, and then exiting with Ctrl + X. Below is an example of the public key I put in, I'm wondering if I was supposed to include the entire string?

Yes, you have to include the entire string.

Usually, after creating your keypair you simply move it to your server (your PI in this case).
This works with this command:

Code:
ssh-copy-id -i .ssh/key_rsa.pub PI-USERNAME@192.168.56.101

with PI-USERNAME being your username on the PI and 192.168.56.101 being the IP of your PI.


Afterwards you will be able to authenticate using public key cryptography, without entering your password.

Carlton Banks
Legendary
*
Offline Offline

Activity: 2576
Merit: 2114



View Profile
October 05, 2018, 11:14:54 AM
 #20

chmod -R 700 .ssh/ (Nothing happened after doing this)
exit

chmod doesn't give you any output if it succeeds, so don't worry about that. If you did ls -l before chmod, then again after chmod, you'd notice the file permissions change, which is chmod's purpose.


For example, at the very end it has the nickname I gave the key "LightNode Keys". Should I omit that?

"LightNode Keys" has a space character in it, but you're not using double quotes around the nickname in the example public key string you gave. I'm not saying that's the overall problem, but it's likely a problem. Avoid putting spaces in anything that's going to get parsed by a command line tool, a space is treated like an indication that a new parameter is after the space from the perspective of parsing commands.

Vires in numeris
Pages: [1] 2 3 4 5 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!