i'm learning networks , found out scp protocol used edit files on other computer. thing other computer should on same network. curious how edit files across different networks?
additional information: in college have computer labs. each lab has 1 switch. computers in particular lab connected switch. of labs have internet connection. if want edit file using vim on computer friend on over different lab, how can it?
application-level protocols ssh , http use underlying tcp/ip connection; work regardless of subnet (barring extended networking features firewalls, packet filters, network proxies, etc.)
so, if friend's computer reachable via internet, or local lab network, , have ip address / dns name of computer, , corresponding port (22 ssh / scp) not blocked, , have login on computer, can remotely edit files there.
if end goal remote editing, approach via these steps, each building on top of previous one:
ping othercomputer
ssh user@othercomputer
- in vim:
:edit scp://user@othercomputer/path/to/file
Comments
Post a Comment