树莓派使用Ngrok进行内网穿透,在公网上搭建个人博客

树莓派性能虽然比不上家用电脑或者服务器,但是搭建个人博客网站足够了。我使用树莓派2B,在树莓派上安装了lnmp,并且搭建了一个个人博客,博客使用Typecho。博客搭建好了,树莓派网站只能在局域网内访问,存在外网无法访问的问题。为解决这个问题,经过一番搜索,终于发现树莓派可以使用Ngrok进行内网穿透,从而在公网上也可以访问树莓派上的博客网站。以下是教程。

一、Ngrok 介绍和选择服务商

首先,什么是Ngrok

ngrok 通过安全隧道将位于NAT和防火墙后面的本地服...

阅读全文

树莓派(RPI) vcgencmd指令用法详解

vcgencmd 指令是树莓派上查看BCM2835系列芯片信息的指令,我们在树莓派上查看GPU温度就要用到 vcgencmd 指令,本文就其详细用法进行说明,以供树莓派爱好者参考。

1.vcgencmd commands显示所有的vcgencmd指令。

pi@raspberrypi:~ $ vcgencmd commandscommands="vcos, ap_output_control, ap_output_post_processing, vchi_test_init, vchi_test_exit, vctest_memmap, vctest_start, vctest_stop, vctest_set, vctest_get, pm_set_policy, pm_get_status, pm_show_stats, pm_start_logging, pm_stop_logging, version, commands, set_vll_dir, set_backlight, set_logging, get_lcd_info, arbiter, cache_flush, otp_dump, test_result, codec_enabled, get_camera, get_mem, measure_clock, measure_volts, scaling_kernel, scaling_sharpness, get_hvs_asserts, get_throttled, measure_temp, get_config, hdmi_ntsc_freqs, hdmi_adjust_clock, hdmi_status_show, hvs_update_fields, pwm_speedup, force_audio, hdmi_stream_channels, hdmi_channel_map, display_power, read_ring_osc, memtest, dispmanx_list, get_rsts, schmoo, render_bar, disk_notify, inuse_notify, sus_suspend, sus_status, sus_is_enabled, sus_stop_test_thread, egl_platform_switch, mem_validate, mem_oom, mem_reloc_stats, hdmi_cvt, hdmi_timings, file"

2.vcgencmd measure_clock <clo...

阅读全文

解决ssh连接“Host key verification failed.”故障

在使用ssh连接服务器或者树莓派时,如果同一个IP的服务器重装或着重置过,则会出现Host key verification failed.故障,具体的错误信息如下
~ % ssh pi@192.168.0.107@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!Someone could be eavesdropping on you right now (man-in-the-middle attack)!It is also possible that a host key has just been changed.The fingerprint for the ECDSA key sent by the remote host isSHA256:1gVpTczj+J2LqzcIINUPaOfrOEBmLwWKYeIN84cyof8.Please contact your system administrator.Add correct host key in /Users/liaixing/.ssh/known_hosts to get rid of this message.Offending ECDSA key in /Users/liaixing/.ssh/known_hosts:1ECDSA host key for 192.168.0.107 has changed and you have requested strict checking.Host key verification failed.
而解决这个故障非常简单,只需要“ssh-keygen -R 你要访问的IP地址...阅读全文