3
5

More than 3 years have passed since last update.

[やってみた][Android]Termuxのインストールとssh接続

Posted at

環境

LenovoPad 601LV(Softbank TAB3)

Android 6.0

参考サイト

TermuxでSSH Serverを起動する

手順

  1. アプリストアからTermuxをインストールし起動

  2. Androidで以下のコマンドを実行

   $ termux-setup-storage

   $ apt update
   $ apt upgrede

   $ apt install -y openssh
   $ ssh-keygen
   $ cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys
   $ chmod 600 ~/.ssh/authorized_keys
   $ chmod 700 ~/.ssh

   $ sshd

   SSH Server を終了する場合
   $ pkill sshd
  1. 参考にしたサイトでは鍵をストレージにコピーとあったが、手順通りのフォルダにコピーしてもPC(Mac)からは参照できなかったため、GoogleDriveアプリを使用し、GoogleDrive経由で鍵ファイルをPCにコピー

動作確認

PCからSSH接続

$ ssh -i id_rsa -p 8022 root@xxx.xxx.xxx.xxx
3
5
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
3
5