LoginSignup
8

More than 5 years have passed since last update.

練習がてら自宅のMacにssh接続してみる

Posted at

準備

ssh接続を許可するためには、接続したいMacの設定を変更する必要があります。

「システムと環境設定」⇒「共有」を開き、リモートログインにチェックを入れます。scsh1.png
チェックを入れると、このようにログイン方法が表示されます。

SSHログイン

Mac/Linuxからログインする場合は、「ターミナル」を開いて以下のコマンドを入力。

$ssh ユーザー名@IPアドレス
The authenticity of host '192.168.***.*** (192.168.***.***)' can't be established.
RSA key fingerprint is XX:XX:XX:XX:XX:XX:XX:XX:XX:XX.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.***.***' (RSA) to the list of known hosts.
Password: 

「RSA key fingerprint」は、なりすまし防止のための、SSHの指紋のようなものらしいです。あまりよくわからないですが「Yes」で大丈夫なようです。

Last login: Sun Sep 27 15:30:00 2015
$

ログインに成功すると上のように表示されます。

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
8