diff options
| author | srdusr <[email protected]> | 2022-12-04 22:09:18 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2022-12-04 22:09:18 +0200 |
| commit | 570a73333079d2176d65b0a444992d7e49e2e5bf (patch) | |
| tree | d4c226c0a5b20edff9fc5db963fb31a15773578b | |
| parent | 7a68dc8c39f29ae1ee6737cd22508ac957e4b14a (diff) | |
| download | notes-570a73333079d2176d65b0a444992d7e49e2e5bf.tar.gz notes-570a73333079d2176d65b0a444992d7e49e2e5bf.zip | |
First draft
| -rw-r--r-- | tools/ssh.md | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tools/ssh.md b/tools/ssh.md index e69de29..7288498 100644 --- a/tools/ssh.md +++ b/tools/ssh.md @@ -0,0 +1,34 @@ +### ssh +* Find out your username +whoami + +* Check ip address +ifconfig +nmcli -p device show + +* Termux install openssh +pkg in openssh + +* Termux make sure user/root password is set +passwd <user> # root does not need to be specified + +* Generate your ssh key pair on remote host machine, not on server machine +ssh-keygen + +* Accessing termux user environment from other consoles +scp [email protected]:~/.ssh/id_rsa.pub ~/.ssh/authorized_keys + +* Second Option How do I add SSH Keys to authorized_keys file? +cat ~/.ssh/id_rsa.pub | ssh [email protected] "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys" + +* Start server in machine that will ssh into +sshd + +* Android remote host into desktop server, assuming default port 8022 +ssh [email protected] -p 8022 + +* Desktop remote host into android server, assuming default port 8022 +ssh [email protected] + +* To view the log output from the server process. +logcat -s 'syslog:*' |