Network Productivity

ssh without password

$ ssh-copy-id -i ~/.ssh/id_rsa.pub -p 300XX xxx-user@10.12.XX.XX

rsync

두 디렉토리 동기화

$ rsync -avzh \
	--dry-run \
	--progress \
	~/Documents/BACKUPZ/2020/ ./2020/

앞에가 src, 뒤가 dest 이며, dry-run 실행 구문이다. --progress412 files to consider 표시.

dig +trace

$ dig +trace likejazz.com

+trace는 DNS 질의 과정을 root dns 부터 모두 표시해준다.

Port Forwarding

$ ssh -N -L 7860:10.17.120.XX:7860 airlab-xxx@10.12.54.XX -p 30001

localhost:7860으로 접속하면 10.12.54.XX:30001의 ssh를 통해 10.17.120.XX:7860으로 연결된다.

ssh 접속 via proxy

$ cat ~/.ssh/config
Host sshuser-vpn
  Hostname 10.17.119.XX
  Port 2222
  User sshuser
  IdentityFile /Users/HXXXXXXX/.ssh/id_rsa_rapids_docker
  ProxyCommand ssh -W 10.17.119.XX:2222 airlab-xxx@10.12.54.XX -p 30001

$ ssh sshuser-vpn

10.12.54.XX를 통해서 10.17.119.XX:2222로 ssh 접속한다.

nload

네트워크 모니터링 $ sudo apt install nload

Device는 eth를 택하도록 화살표로 선택하고 F2 옵션에서 Unit for traffic numbers: Human Readable (Byte)에서 TAB으로 선택, F5로 저장

Reverse Proxy

A Reverse Proxy to help you expose a local server behind a NAT.

frps:

# frps.toml
bindPort = 7000

$ ./frps -c frps.toml

frpc:

# frpc.toml
serverAddr = "x.x.x.x"
serverPort = 7000

[[proxies]]
name = "ssh"
type = "tcp"
localIP = "127.0.0.1"
localPort = 22
remotePort = 2222

$ ./frpc -c frpc.toml
$ ssh -p 2222 xxx@x.x.x.x

nohup without Docker

$ http_proxy= nohup ./frpc -c frpc.toml &

Last Modified: 2024/06/25 14:47:08

is a collection of Papers I have written.
© 2000 - Sang Park Except where otherwise noted, content on this site is licensed under a CC BY 4.0.
This site design was brought from Distill.