Beginners Guide: Locating your board, connecting to it.
#1
Information 
This is a brief guide for beginners who are visiting the forum. I will be going through the following: 

Finding out the IP address of your Rock64 Board when its not connected to a display (Headless) 
Connecting to your board via SSH
Setting up a Hostname (to connect to your Board even if the IP address is Dynamic)
Setting up a Static IP and fixing DNS



Prerequisites:

Rock 64 SBC

MicroSD card flashed with Linux Ethernet Connection

Android/iOS device with access to the app store. 






Finding out the IP address of your SBC





The first step, before plugging in your Rock64 would be to use a Network scanning app to find out and list all the devices on your network. I personally use Fing: 

Google play: https://play.google.com/store/apps/detai...fing&hl=en

Itunes: https://itunes.apple.com/au/app/fing-net...21107?mt=8

I have an Android phone, the iPhone interface should be largely similar. 

After the app is installed, run a network scan. Note the number in the top right corner, denoting the number of currently connected devices. 

[Image: m86Iito.jpg]


Then, turn on the Rock 64 Board. While you wait for it to turn on, You might want to change some settings to make it easier to find your new device. 

Tap on the Wifi Network name to open up the Local Network settings page: 

[Image: q7X108R.jpg]


Select "Sort Devices" and choose "Last Change" 

[Image: oQLF9ZY.jpg]

That should result in any new devices being listed near the top. The Rock64 Board should have booted by now. You'll know by checking the LEDs: Green - DC connected, White - Power, Red - Standby

[Image: CTBiCVs.jpg]

Now that the board has booted up, go back to the main Fing Screen and click the refresh button to initiate a new scan. if the Rock64 successfully booted and connected to the network (via DHCP), you should see a new item on the list: 

[Image: QlZ9nMt.jpg]

As you can see, there are a few more devices on my network, the Rock64 (the other device was my phone that came out of deep sleep, it had "Apple" written on the left, so I knew that wasnt the Rock64). 

We have the IP address of the Rock64, but we can do one more step to confirm, click on the item to open its page, then select "scan services" 

[Image: 6g4V8g2.png]

The app will commence a scan, and within a few seconds, you should see one service discovered: 

[Image: QOv113m.jpg]

This confirms that the device is most likely the Rock64, unless you have had another device connected to your Wifi network that happens to be running an SSH server. 




Note down the IP and MAC address. Depending on your Router (and DHCP) configuration, rebooting your Rock 64 board or your Router might result in the IP address of the Rock 64 Changing. However, the MAC address should stay the same. Simply do a scan using the app to find the IP address of your board if you suspect the IP address has changed.


  Reply
#2
Connecting to your board via SSH



How you connect via SSH depends on what OS you are using as a client (the device you want to SSH From). The server in this case is the Rock 64 Board. 

The username/password of the Rock64 OS will depend on which OS you've downloaded and flashed: 

http://wiki.pine64.org/index.php/ROCK64_Main_Page



Windows:

If you use Windows, it doesnt have an SSH client, you'll need to download one to SSH into the Rock 64. 

Here is one example: 

https://www.fastcomet.com/tutorials/gett...rted/putty

However, for step 2, you'll need to insert the IP address of the Rock 64 ou found in the previous post: In this example it was 192.168.1.128. Yours will likely be different. 

You should have it looking somewhat similar to this: 

[Image: FSWVGgq.png]  

Click on "Open" to start initiating a SSH connection. You might get a warning message about a RSA key. 

[Image: qIsxH4l.png]

Its not important at this stage, since it is over a local connection and you have physical access to the hardware. Accept the connection. 

Once you accept the connection, you'll be prompted to insert a Username/Password. This depends on the OS image you downloaded, its available on the Wiki Link. In My case, the image is the "Xenial Mate" image, so the username/password is rock64/rock64. Its normal to not see the password being typed in, this is a security feature. 

[Image: QRrKPof.png]


If everything goes well, you should now be logged into your Board, and the display should look something like this: 

[Image: u9ukGUz.png]

That means you're in and you can issue commands and communicate with your board via SSH! 


Mac OS:

I dont have a Mac OS device to test this out on, but the process is much more simpler on Mac OS and Linux than windows. 


http://osxdaily.com/2017/04/28/howto-ssh-client-mac/

In this scenario, the string:


Code:
ssh username@ip.address
 

Would look like

Code:
ssh rock64@192.168.1.128


Again, this depends on which Image was downloaded and what the IP address is.




Linux:


Very similar to the MacOs guide. Open your favourite terminal emulator installed in your distro and enter the credentials and thats all there is to it!

https://help.ubuntu.com/community/SSH/Op...nnectingTo



  Reply
#3
Information 
Setting up a Hostname 


Preface
Depending on your network configuration, and how often you reboot your Rock 64 or your Router, you might see that the IP Address of the board changes. This is simply the byproduct of the device having a dynamically assigned IP address, most devices on home/small default to that mode.

If you wish to keep logging in or accessing your Board without having to keep track of your IP, there are two strategies. The first is assigning a Hostname to your device, so that even if it's IP address changes in the network, it will still be identifiable (and contactable) via a hostname. The second option is to configure the device to keep its IP address Static. 

In this guide, we will be setting up a Hostname. 



You'll need to make sure you know the current IP address of your device, and be logged in via SSH.  

The easiest way to do this is to use a tool called "nmtui". You'll need superuser privileges to invoke this text user interface, so put the following into the terminal and hit enter: 

Code:
sudo nmtui


Use the arrows key to select "Set System Hostname" and press the tab key to highlight "okay". 

[Image: pBqWZfC.png?1]

Hit enter and you should get a text field to set the hostname of your choice. 

[Image: xx7tvI1.png] 

Press the tab key to highlight "okay" and hit enter to set your new hostname: 

[Image: JFTmrd9.png] 




Not all Distros have this tool installed. If you dont have nmtui installed, there is another fairly simple way.  

You'll need to edit the file /etc/hostname and to do that, you'll need superuser privilege. Type in: 

Code:
sudoedit /etc/hostname



Then type in your password and hit enter. 
[Image: MyDO0De.png]
It will open a basic text editor, in which you put down the hostname you'd like: 
[Image: lWy5nq3.png]
Hold down  the Control key and Hit X to save and exit, you'll be prompted to save. Press the Y key: 
[Image: V4or3Ht.png]
Press enter to save the file, dont worry about the filename: 
[Image: V4or3Ht.png]
You'll need to edit one more file, in a similar way: 
Code:
sudoedit /etc/hosts
 
Change the first line to the same hostname you set prior: 
[Image: VypZIJ5.png]
Save and exit the document the same way: press Control + X, then Y, the Enter to finally save and exit the text editor. 
To immediately change the hostname without a reboot, you'll need to run a script: 

Code:
sudo /etc/init.d/hostname.sh start
It should take a moment to run and return you to prompt. You should have your hostname changed now, confirm it by typing in "hostname" into the terminal: 
[Image: JfKVeyn.png]


To login using a hostname instead of an IP Address, you simply put in the hostname followed by a ".local" into your SSH client. This way, it will connect to the server, regardless of what its IP address may be. In this case, my hostname was rock64.  


So, instead of doing 


Code:
ssh rock64@192.168.1.128


I can simply do 

Code:
ssh rock64@rock64.local

Which follows this notation: 

Code:
ssh username@hostname.local



[Image: FUfbY9k.png]

Using this method, you will be able to access your board, regardless of what the IP address is.
  Reply
#4
Setting up a Static IP and fixing DNS issues


Preface 

Some use cases require that you keep a static IP address, and dont work well with hostnames. This guide will show you how to set up a static IP address and to fix up DNS issues that are commonly caused by that. 

You'll need be logged in to your device and before you start changing anything, you'll need to collect some information. 

The first command is 


Code:
ip a 

OR 


Code:
ip addr


You'll get something like the following. Note down the Gateway as well as the Subnet Number. 

[Image: PTyBQKM.png]

You'll need to modify the network interfaces file in order to set a static IP address. 

Code:
sudoedit /etc/network/interfaces

Insert your password and it should open up to the text editor interface you've become quite familiar with. You'll need to comment out the last line, and add your own settings. Mine are shown below: 

[Image: BAGOo6g.png?1]


Code:
    auto eth0
    iface eth0 inet static
        address 192.168.1.128
        netmask 255.255.255.0
        gateway 192.168.1.1
        dns-nameservers 8.8.8.8 8.8.4.4

Address is what you'd like your IP address to be. Normally its in the range of 192.168.1.xxx where xxx is a number between 1-254. You can use a Network scanning app, like Fing, the one I showed in the first part of this guide, to see what IP addresses are occupied. 


I dont know enough to know exactly what a netmask is, however, if your IP address had a "/24" after it, as shown above, the netmask would be 255.255.255.0

The gateway is what was shown in the command "ip route", write down its value here. In my case it was 192.168.1.1

The DNS nameserver simply tells your computer where to go to see what human readable URL corresponds to what IP address. I personally use Googles Nameservers, you can use that, or you can select one from the handy list here: https://www.lifewire.com/free-and-public...rs-2626062



Fill in the details, then save and exit the editor. Restart your device using the following command: 


Code:
sudo reboot

Wait a minute or so for it to boot up. If you want to see if its on the network with the new IP address address before trying to SSH into it, you can do so using a network scanning up, like FING, the same app I used in the first part of the guide. You should do a new scan and you will see your board occupying the new IP address you set. 

 
SSH in, using either your newly set IP address or your Hostname. Now its time to check if WAN (internet) access still works. 

We are going to ping googles DNS servers (any IP address SHOULD work) for this.

Code:
rock64@rock64:~$ ping 8.8.4.4 
PING 8.8.4.4 (8.8.4.4) 56(84) bytes of data.
64 bytes from 8.8.4.4: icmp_seq=1 ttl=57 time=19.8 ms
64 bytes from 8.8.4.4: icmp_seq=2 ttl=57 time=11.9 ms
64 bytes from 8.8.4.4: icmp_seq=3 ttl=57 time=11.3 ms
64 bytes from 8.8.4.4: icmp_seq=4 ttl=57 time=12.3 ms
64 bytes from 8.8.4.4: icmp_seq=5 ttl=57 time=12.4 ms
64 bytes from 8.8.4.4: icmp_seq=6 ttl=57 time=14.9 ms
^C
--- 8.8.4.4 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5007ms
rtt min/avg/max/mdev = 11.394/13.836/19.891/2.927 ms


The "^C" key shown there is simply holding down Control and pressing C. This send the program a "SIGINT" which asks the program to "end" or "stop". 

This command shows that we can communicate with Googles DNS servers, which means that the internet is working.  To see confirm that the DNS service is working, redo the ping command, but use a text URL instead: 


 
Code:
rock64@rock64:~$ ping www.pine64.org
PING www.pine64.org (104.31.70.111) 56(84) bytes of data.
64 bytes from 104.31.70.111: icmp_seq=1 ttl=51 time=106 ms
64 bytes from 104.31.70.111: icmp_seq=2 ttl=51 time=108 ms
64 bytes from 104.31.70.111: icmp_seq=3 ttl=51 time=109 ms
64 bytes from 104.31.70.111: icmp_seq=4 ttl=51 time=115 ms
64 bytes from 104.31.70.111: icmp_seq=5 ttl=51 time=109 ms
64 bytes from 104.31.70.111: icmp_seq=6 ttl=51 time=107 ms
^C
--- www.pine64.org ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5007ms
rtt min/avg/max/mdev = 106.631/109.628/115.740/2.966 ms
rock64@rock64:~$ 


You have now successfully assigned a static IP address to your board, and ensured that the internet is accessible and that the DNS service is working properly.
  Reply
#5
Good guidance. I also found an online articles about how to set up new router and find out IP address http://19216811.guru/
  Reply
#6
(08-20-2017, 04:29 AM)nilesh7 Wrote: Good guidance. I also found an online articles about how to set up new router and find out IP address http://19216811.guru/

For Modem/router credentials, portforward.com never really failed me: 

https://portforward.com/router-password/
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Beginners Guide: Migrating to SSD rontant 18 39,653 01-19-2022, 09:30 AM
Last Post: Ellesar Dragon
Information Beginners Guide: Adding USB Storage, Linux Formatting and Permissions Ptheven 4 12,220 03-06-2021, 01:49 PM
Last Post: helpmerock
  Step by step guide PXE diskless configuration. burglar_ot 13 35,631 11-01-2020, 11:26 PM
Last Post: michael.gruner
Thumbs Up A guide for how I made RetroPie, RetroArch, and EmulationStation Work on the Rock64 Mrfixit2001 4 16,026 12-17-2018, 03:52 AM
Last Post: va88
  Guide - XRDP - Debian Stretch / Ubuntu Xenial / OMV S3phi40T 3 13,960 05-05-2018, 06:08 AM
Last Post: S3phi40T
Information Guide - Raid Array (Raid 0) Ptheven 0 4,809 10-07-2017, 09:22 AM
Last Post: Ptheven
Information Guide - Setting up a NFS Share Ptheven 0 5,462 09-26-2017, 04:44 AM
Last Post: Ptheven
  Guide - Setting up a SMB(Windows) file server Ptheven 0 12,570 08-21-2017, 08:54 AM
Last Post: Ptheven

Forum Jump:


Users browsing this thread: 1 Guest(s)