1
0
mirror of https://github.com/mobile-shell/mosh.git synced 2026-03-01 18:23:30 +01:00

136 Commits

Author SHA1 Message Date
Alex Chernyakhovsky
62869ae55f Rename VERSION to VERSION.stamp
-I$(top_srcdir) is not usable on macOS due to a conflicting C++ header
 `version`.
2023-07-30 17:03:40 -04:00
Kalle Samuels
9cf1a9c8ee Don't sometimes hang just after launching ssh
sshd has a bug in which the sometimes it may get stuck trying to read from the client
even though the child process has already exited. This is visible at
https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/serverloop.c?annotate=1.226 line 274:
once the child is waited on, `child_terminated` is reset to 0, which causes it to use an infinite timeout 
in the select there.

This workaround causes mosh to disconnect from the server, thereby allowing sshd finish.
2021-10-28 12:38:04 -07:00
Anders Kaseorg
e009ba4e76 configure: Set language to C++ globally
As of commit dd941df19d, we no longer
build any plain C, except within AM_PROG_AR.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-10-02 22:42:20 -07:00
Anders Kaseorg
d4ce0d4f4f mosh.pl: Allow shell expansion of --server with --local
Fixes #946, matching the behavior of --server without --local.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2017-12-02 23:00:33 -05:00
Anders Kaseorg
5433688364 mosh.pl: Fix the error message if getaddrinfo is missing
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2017-10-26 19:43:43 -04:00
John Hood
195ef46561 Add Perl compile
This helps catch Perl syntax/version/dependency issues at build time
rather than run time.
2017-10-25 23:02:10 -04:00
John Hood
c8580d1fb6 Rename and document --predict-overwrite. 2017-08-02 21:56:32 -04:00
John Hood
8aac3cc927 Allow non-inserting prediction.
This may be useful for users who find prediction's activity right of
the cursor distracting.

Prediction underscoring is still a little weird sometimes, it replays
a history of known/unknown changes as acks come in from the server.
2017-08-02 00:31:37 -04:00
Alexander Chernyakhovsky
5ee542c26c Restore perl 5.8.8 support
This is as variant of the patch I had in EL5 for a while, but forgot to upstream.
It turns out that the changes we made to support 5.10.1 are actually sufficient
for 5.8.8 if we remove unused imports, so remove them.
2017-03-26 17:16:37 -04:00
John Hood
a777c8580e Revert "Start ssh with -f instead of -n to avoid ssh hangs."
This reverts commit f002e3bb30.

That commit appears to have created a race between ssh restoring
termios state and mosh-client initializing termios.

Probably fixes #844.
2017-01-04 23:00:18 -05:00
John Hood
f002e3bb30 Start ssh with -f instead of -n to avoid ssh hangs.
This seems to resolve #833.
2016-12-02 23:12:07 -05:00
Ashish Gupta
3ba5a29758 Clarify that -p does not affect SSH port 2016-11-19 18:16:01 -05:00
chenxiaoqino
0c2088d1da Add a little hint for first-time users
I was recommended to use mosh as "an in-place replacement for ssh" by
my friends, and take a while to figure out the message until I
realized I missed the line "The Mosh package should be installed on
both the client and server."

If this line often corresponds to missing server-side installation,
rather than other mysterious scenario, how about adding a hint?
2016-11-19 17:31:29 -05:00
Anders Kaseorg
94027efc45 Make all commands properly support --help and --version
These should output to stdout and exit with status 0.  Passing
std-options to AM_INIT_AUTOMAKE causes ‘make installcheck’ (hence also
‘make distcheck’) to verify this.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-19 17:15:48 -05:00
Anders Kaseorg
df085e02dc Restore Perl 5.10 support
On Perl < 5.14, we can use Socket::GetAddrInfo from CPAN to replace the
missing getaddrinfo functionality of Socket.

Socket::GetAddrInfo < 0.22 requires :newapi in the import list, but 0.22
forbids it and enables the new API by default.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-12 01:43:08 -05:00
John Hood
04b03b41f6 Revert "Do not close stdin on ssh session."
This reverts commit 45c521d632.
2016-11-11 23:31:11 -05:00
John Hood
45c521d632 Do not close stdin on ssh session.
This helps with #819.
2016-11-06 06:15:41 -05:00
Anders Kaseorg
8a8f2b29ca Fix most shell hygiene issues found by shellcheck
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-04 03:15:03 -04:00
John Hood
70d48fbcc0 Add --no-ssh-pty option.
This eliminates issues with typeahead being echoed by the remote pty
and corrupting remote output from mosh-server to the mosh script, but
cannot be made default because older mosh-servers require a pty.
2016-09-19 13:23:15 -04:00
John Hood
8945efeb82 Allow server to bind an OS-selected UDP port with -p 0.
It looks like Mosh used to be able to do this but the capability was
lost when port ranges were added in 141ec23.
2016-09-19 13:23:15 -04:00
Keith Winstein
a09381d161 http -> https links for mosh.org 2016-08-12 00:11:47 -07:00
Keith Winstein
ca2750dd03 Update website location (mosh.mit.edu -> mosh.org) 2016-08-12 00:10:53 -07:00
John Hood
af8ddd090e Add options to prefer v4 or v6 on connect; make prefer-inet the default.
Resolves #764, mostly.
2016-07-10 23:30:24 -04:00
John Hood
1b2ddc2e81 Make OS X mDNS/Bonjour .local IPv6 addresses work.
OS X advertises IPv6 link-local addresses for .local hostnames.
getaddrinfo() correctly reports interface identifiers for these, but we
were discarding them by using the socket peer host address instead.
2016-06-09 11:51:35 -04:00
Robin H. Johnson
274b5a4d14 bind-server: accept any value to option.
Rather than trying to validate, accept any option to the bind-server
option, and allow mosh-server to validate it, as noted by
https://github.com/mobile-shell/mosh/pull/670#issuecomment-135147605

Fixes: 669
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2016-06-09 00:31:49 -04:00
John Hood
30eb5bb515 mosh.pl: restore compatibility with older Socket module.
Also require Perl 5.14, which is the new compatibility
floor.

Fixes #758.
2016-05-24 15:13:12 -04:00
Anders Kaseorg
4c7200c016 --experimental-remote-ip=local: Substitute the IP more carefully
For example, do not interpret regex metacharacters within the
hostname, and avoid accidentally matching the username part of
username@hostname when they happen to match.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-05-09 03:01:32 -04:00
Jaeho Shin
d636845c8d Display original command line argv via no-op flag.
Improves 679b819216 to make it simpler to
ignore mosh-client from OS X Terminal.app's "Ask before closing" process
list. (See: http://superuser.com/a/254647)

Moreover, the command displayed from ps is a completely functional one,
which was not the case in the previous approach, that mangles `argv[0]`.

Fixes #742.
2016-05-08 23:05:36 -04:00
John Hood
09bdc7caae Enforce SHELL=/bin/sh for more reliable SSH proxy command. 2016-05-08 22:59:30 -04:00
John Hood
eb98976410 Add --experimental-remote-ip option. 2016-05-08 22:47:54 -04:00
John Hood
dbbed24d83 Use server's $SSH_CONNECTION if ProxyCommand isn't run.
This is an alternate way to resolve #417 without affecting
backward compatibility.
2016-03-30 23:52:19 -04:00
John Hood
9dbf3b366d mosh.pl: use single quotes where appropriate 2016-03-30 23:52:19 -04:00
John Hood
389fc23205 Better, more flexible handling for IPv4/IPv6.
Add --family=auto/all.
Attempt connects to all available addresses.
Working error handling.

Fixes #629.
2016-03-30 23:52:19 -04:00
John Hood
b742e958b6 mosh-server: Support timeouts on lost connectivity to network client.
Closes #690.
2015-11-24 02:36:08 -05:00
Anders Kaseorg
f0f2aa7cce mosh.pl: Run ssh directly instead of via sh
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2015-11-01 01:07:21 -04:00
John Hood
448f9f1bab mosh: implement --local option for use without ssh 2015-10-03 03:43:18 -04:00
John Hood
937ab14f86 scripts/mosh: Make the generated file executable. 2015-05-31 23:09:04 -04:00
Anders Kaseorg
b58e750daf scripts/mosh: Fix hang when remote closes the connection
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2015-05-28 23:41:57 -04:00
John Hood
9eeb2fbffa mosh.pl: Add a better error message for IPV6 & Socket::IP. 2015-05-28 22:49:46 -04:00
Anders Kaseorg
e7903f0de2 scripts/mosh: Allow IO::Socket::INET6 as an alternative to IO::Socket::IP
Some systems have IO::Socket::INET6 preinstalled, so we might as well
accept either.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2015-05-28 22:49:46 -04:00
John Hood
14bdd8f00f mosh.pl: Make syntax valid before Makefile edits. 2015-05-28 22:49:46 -04:00
john hood
f3073bbe5d Add git commit version info 2015-05-25 03:46:48 -04:00
Anders Kaseorg
a4c5829812 scripts/mosh: Add -6 option to connect with IPv6
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2013-08-17 09:21:38 -04:00
Anders Kaseorg
aeee659c28 scripts/mosh: Let IO::Socket resolve the hostname
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2013-08-17 09:02:45 -04:00
Keith Winstein
4792992afa Rename --bind-ip to --bind-server, add =ANY option, add error checking.
Closes #415.
2013-04-28 15:33:36 -04:00
Philipp Haselwarter
fc70612de6 mosh perl wrapper: New option --bind-ip={ssh|IP}
Allow overriding the switch passed to mosh-server from -s to -i IP.

Signed-off-by: Philipp Haselwarter <philipp@haselwarter.org>
2013-04-28 15:14:47 -04:00
Anton Lundin
fb39fe2c7e Simplify pipe management
We don't need to write perl like C.
2013-04-09 22:31:12 +02:00
Keith Winstein
1b9915fcaf Bump version to 1.2.4a 2013-03-27 18:36:03 -04:00
Keith Winstein
688bf21b07 Bump version to 1.2.4 2013-03-27 00:28:47 -04:00
Keith Winstein
c6a8427d61 mosh Perl wrapper: Downgrade Perl regex to avoid named capture
(Failed on Perl 5.8 with OS X 10.5)
2013-03-10 22:53:05 -04:00