Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.

...

Codeblock
languagebash
gosper@hal9000:~$ ssh root@172.16.2.100
root@172.16.2.100's password: 
# w
USER		TTY		IDLE	TIME		 HOST
root            console         00:01   Jan  1 00:01:51  
root            pts/0           00:00   Jan  1 00:16:20  172.16.0.1
# 


And verify that SFTP is working:

Codeblock
languagebash
gosper@hal9000:~$ sftp root@172.16.2.100
root@172.16.2.100's password: 
Connected to root@172.16.2.100.
sftp> ls /
/bin         /boot        /dev         /etc         /lib         /lib32       /linuxrc     /lost+found  /media       
/mnt         /opt         /proc        /root        /run         /sbin        /sys         /tmp         /uboot.env   
/usr         /var         
sftp> 


So, now we can make a change to our Qt5 application, for example changing the label of the button, recompile by running make in the application directory, and directly copy the application using scp, and run it over ssh:


Codeblock
languagebash
$ make
[...]
$ scp qt-sensor-demo root@172.16.2.100:/usr/bin/
root@172.16.2.100's password: 
qt-sensor-demo                                    100%   12KB 634.7KB/s   00:00
$ ssh root@172.16.2.100
root@172.16.2.100's password: 
# qt-sensor-demo -platform linuxfb

Much nicer, we don’t have to reflash our SD card every time we want to test a change in our application!

Note that we could create a public/private key pair, with the public key on our target, and this way not have to enter our password every time we want to transfer a file or log-in to the target. Since this blog post is already very long, we’ll live that as an exercise for the reader, there are plenty of resources on the Web about this topic.