0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

RaspberryPi4でSSHを使用してWindowsモートデスクトップで操作する

Posted at

はじめに

RaspberryPiをWindowsからリモートデスクトップで接続する手順をまとめてみました。 やってみると意外と簡単で拍子抜けしてしまいました。

手順は
・RaspberryPiのSSHを有効にする
・RaspberryPiのIPアドレスを確認する
・RaspberryPiにxrdpをインストールする
・Windows10でリモートデスクトップ接続をする
以上です。(たったこれだけ・・・)

しかし、これは同一LAN内からの接続のみなので、外部から接続しようとした場合は別の設定が必要になります。

SSHを有効にする

11.jpg

22.jpg

WiFiのIPアドレスを確認する

Terminalを開いてifconfigと入力

pi@ユーザー名:~ $ ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether dc:a6:32:71:d6:87  txqueuelen 1000  (イーサネット)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (ローカルループバック)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.100.119  netmask 255.255.255.0  broadcast 192.168.100.255
        inet6 2001:268:c1e5:8877:ec89:4673:a5b3:647a  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::b585:966c:8402:2eb0  prefixlen 64  scopeid 0x20<link>
        ether dc:a6:36:70:d6:78  txqueuelen 1000  (イーサネット)
        RX packets 17951  bytes 13939435 (13.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 13100  bytes 2826298 (2.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

pi@ユーザー名:~ $ 

wlan0のinet 192.168.100.119となっている部分がipアドレス

Windowsリモートデスクトップで接続してみる

Terminalを開いてxrdpをインストールする

pi@ユーザー名:~ $ sudo apt-get install xrdp

これでRaspberryPi側の設定は終わりです。

次にリモートデスクトップ接続をしたいWindows]パソコンのリモートデスクトップを開き、RaspberryPiのIPアドレスを入力します。
test.jpg

すると以下のようなウインドウが出てくるのでusernameとpasswordを入力します。
te1111st.jpg

WindowsでRaspbianを開くことができました。

無題.jpg

最後に

いままで、RaspberryPiとWindowsで別々のキーボード、マウス、ディスプレイを使っていましたが、これで同一LAN内でWindows上からRaspberryPiにアクセスすることができるようになりました。
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?