Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
Использует порты 60000–61000 (тысячу портов)
user@puser:$ pi
PING ya.ru (87.250.250.203) 56(84) bytes of data.
64 bytes from www.yandex.ru (87.250.250.203): icmp_req=1 ttl=56 time=12.3 ms
64 bytes from www.yandex.ru (87.250.250.203): icmp_req=2 ttl=56 time=12.4 ms
64 bytes from www.yandex.ru (87.250.250.203): icmp_req=3 ttl=56 time=12.6 ms
ng goo
PING google.com (173.194.32.41) 56(84) bytes of data.
64 bytes from arn06s02-in-f9.1e100.net (173.194.32.41): icmp_req=1 ttl=46 time=52.3 ms
64 bytes from arn06s02-in-f9.1e100.net (173.194.32.41): icmp_req=2 ttl=47 time=52.2 ms
64 bytes from arn06s02-in-f9.1e100.net (173.194.32.41): icmp_req=3 ttl=47 time=52.2 ms
dok.ru
PING goodok.ru (213.189.197.83) 56(84) bytes of data.
64 bytes from axx83.distributed.zenon.net (213.189.197.83): icmp_req=2 ttl=119 time=19.9 ms
64 bytes from axx83.distributed.zenon.net (213.189.197.83): icmp_req=3 ttl=119 time=26.1 ms
64 bytes from axx83.distributed.zenon.net (213.189.197.83): icmp_req=4 ttl=119 time=41.4 ms
^C
--- goodok.ru ping statistics ---
4 packets transmitted, 3 received, 25% packet loss, time 3011ms
rtt min/avg/max/mdev = 19.995/29.207/41.448/9.018 msMosh: Connecting... (155 s without contact.) [To quit: Ctrl-^ .] Ctrl-^
?Ctrl-^ .
ximaera@atlantis:0#530:~$ /tmp
cd /tmp
ximaera@atlantis:0#531:/tmp$ git clone https://github.com/keithw/mosh.git
Cloning into mosh...
remote: Counting objects: 3558, done.
remote: Compressing objects: 100% (1075/1075), done.
remote: Total 3558 (delta 2552), reused 3429 (delta 2446)
Receiving objects: 100% (3558/3558), 678.62 KiB | 520 KiB/s, done.
Resolving deltas: 100% (2552/2552), done.
ximaera@atlantis:0#532:/tmp$ grep -r Ctrl-\^ mosh
mosh/man/mosh.1:The escape sequence to shut down the connection is \fBCtrl-^ .\fP
mosh/src/frontend/stmclient.cc: if ( the_byte == '.' ) { /* Quit sequence is Ctrl-^ . */
mosh/src/frontend/stmclient.cc: /* Emulation sequence to type Ctrl-^ is Ctrl-^ ^ */
mosh/src/frontend/stmclient.cc: /* Ctrl-^ followed by anything other than . and ^ gets sent literally */
mosh/src/frontend/terminaloverlay.cc: swprintf( tmp, 128, L"mosh: Last contact %.0f seconds ago. [To quit: Ctrl-^ .]", (double)(now - last_word_from_server) / 1000.0 );
mosh/src/frontend/terminaloverlay.cc: swprintf( tmp, 128, L"mosh: %ls [To quit: Ctrl-^ .]", message.c_str() );
mosh/src/frontend/terminaloverlay.cc: swprintf( tmp, 128, L"mosh: %ls (%.0f s without contact.) [To quit: Ctrl-^ .]", message.c_str(),
ximaera@atlantis:0#533:/tmp$ grep -rnA 10 Ctrl-\^ mosh/src/frontend/stmclient.cc
214: if ( the_byte == '.' ) { /* Quit sequence is Ctrl-^ . */
215- if ( network->has_remote_addr() && (!network->shutdown_in_progress()) ) {
216- overlays.get_notification_engine().set_notification_string( wstring( L"Exiting on user request..." ) );
217- network->start_shutdown();
218- return true;
219- } else {
220- return false;
221- }
222- } else if ( the_byte == '^' ) {
223: /* Emulation sequence to type Ctrl-^ is Ctrl-^ ^ */
224- network->get_current_state().push_back( Parser::UserByte( 0x1E ) );
225- } else {
226: /* Ctrl-^ followed by anything other than . and ^ gets sent literally */
227- network->get_current_state().push_back( Parser::UserByte( 0x1E ) );
228- network->get_current_state().push_back( Parser::UserByte( the_byte ) );
229- }
230-
231- quit_sequence_started = false;
232- continue;
233- }
234-
235- quit_sequence_started = (the_byte == 0x1E);
236- if ( quit_sequence_started ) {
ximaera@atlantis:0#534:/tmp$
Ctrl-^ . ни разу не правильная, так как ^ делается с шифтом, а в искомой комбинации шифт не нужен.
Mosh — SSH 2012 года