1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Macからssh経由でラズパイへ直接日本語入力する

Posted at

背景

記事タイトル通り、Mac標準ターミナルアプリからラズパイへsshでログインしてあれこれしてるときに、直接日本語も入力させたくなったときにやった設定変更の記録メモです。

作業したときのmacOS は Sequoia 15.3.1 (24D70) です。
Raspberry Pi OS は bookworm12 インストール直後を想定しています。

設定手順

ラズパイのデフォルトロケールをja_JP.UTF-8にする

sudo dpkg-reconfigure locales で画面上で ja_JP.UTF-8 を選び、これをデフォルト設定にする

image.png

ラズパイのsshのデフォルトを ja_JP.UTF-8 にする

ラズパイに /etc/ssh/sshd_config を以下の内容で新規ファイル作成する

LANG="ja_JP.UTF-8"
LC_CTYPE="ja_JP.UTF-8"
LC_ALL="ja_JP.UTF-8"

ラズパイへssh接続しなおす

Mac側の日本語入力がUTF-8になっていれば、nano などで直接入力できるようになっていると思います

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?