srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ssh.md
blob: 7288498e055fe752d4e22249709dba8ddb082f29 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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:*'