Portable Windows Mosh? - windows

I was wondering if there's a way to use Mosh on windows without Cygwin?
I need to be able to put it on my USB drive and copy it over to a windows computer and be able to Mosh into one of my servers. Otherwise, is there a way to use Cygwin and have it portable? I did get mosh working under windows via Cygwin, but that meant I had to add an environment path to the windows computer, which, on the windows computer that I'm working on doesn't allow you to change that, since I don't have admin privileges.

MobaXTerm is portable and supports Mosh.
It works quite well. I spent all day using it on a very dodgy connection and it worked like a charm.
Just get the most recent version and from the Session menu select Mosh. It did does not support IPv6 (at least in Version 9.2 (2016-09-18)):
Bugfix: Mosh sessions are forced to IPv4 only (IPv6 is not yet supported by Mosh client/server)
But it might work now, since Version 10.4 (untested):
We also improved MobaXterm behavior and fixed issues with multi-monitors, IPv6 connections, mouse scrolling and keyboard shortcuts.

Interestingly enough, I wanted MOSH for Windows too, and I find Cygwin to be very messy. Instead, I just downloaded a minimal Text-only Debian distribution, booted it up in VirtualBox, and installed MOSH. Surprisingly, it's much less time consuming and requires less tweaking than going the Cygwin route, and makes less modifications to the host machine.
In fact, there is a portable VirtualBox, so you can put your MOSH VM and Portable VirtualBox on a memory stick.
I haven't even tried to optimize things, but it runs just fine on the 256MB of ram I gave it. It would probably run just fine on 64MB or less.
I do hope MOSH will be built into PuTTY/KiTTY in the future.

I have noticed that a new version of MobaXterm has been released (version 7.1) and includes an intergrated Mosh session.
So, you dot not need anymore need plugin for that.
They said that it is "experimental", but I have tested it, and it is working quite well.

As of now, Mosh has added support for Google Chrome (or any of Chromium Browsers) as an official extension. So you can keep a portable google chrome & use mosh from there.

For Windows, there isn't a single solution install to support MOSH. Rather, you have to sort of "stitch together" a few options to make it work.
MOSH itself does not need ssh or any other initial program necessarily. It is possible to start a session on your server, then using the published connection information, go to your client (in this case your windows box) and use that information to connect the session. This is sort of messy and is the main reason people use SSH to basically establish a connection to the server, remotely start a MOSH server, get the session information back to your client machine, then launch the MOSH experience.
The two pieces you need on the client side (if you make the connection manually) are the server port number and symmetric encryption key. A typical example of one given by a MOSH server would be:
MOSH CONNECT 60001 U0MWPbwn3BdcdMyNLnSFCA
Where 60001 is my port number and "U0...CA" is my encryption key. Don't ever give this out BTW as ANYONE can connect to your running MOSH server with this information (that is, they would look just like an IP change just like you do when you get disconnected and reconnected)
So, back to installation. MobaXterm (currently at v10.5) is a free for personal use app that you can find at https://mobaxterm.mobatek.net/. Installation is relatively straight forward. One word of caution however, their SSH implementation is rudimentary. Basically they support password authentication for ssh. If you use public keys, you cannot have one with a password on it and expect it to work (the code to ask you for your password appears to be missing). This might not be a show stopper for everyone but this is where my company stopped following this thread.
Within MobiXTerm, you want to hit the "Sessions" button at the top left to bring up a new session window. Press the Mosh button on the top right to get the start of your session (NOTE: This is IPv4 only. Zippo luck on getting IPv6 with this to work). Enter your remote host and the username of the ssh account you will be using. If you have an unsigned ssh key, then you can use the Advanced Mosh setting to link that private key with this session (at this point, as a security guy, I'm sort of passing out). At this point, as long as mosh is correctly running on your server (with the 60000-61000 UDP ports open in the server firewall), things should "just work".
Ok, so its not too painful to get working this way. But other than terminal functionality, its not very much fun either. Although MobiXterm is an X-server, I haven't yet gotten X to function over the mobi connection (at least not automatically).

Related

Guacamole RDP Control+C/Command+C doesn't work from MacOS

I'm prototyping using Apache Guacamole for brokering RDP connections.
The tech stack works really well, however, I'm hitting a usability issue in regaurds to running a Mac and trying to send hot keys like Control+C/Command+C and them not working.
Per Guac's docs, this seems to be inline with what they expect, as they don't do any "curtesy" remapping that other RDP managers on Mac (Microsoft Remote Desktop, RDS HTML5 Client, etc) do.
My question is has anyone found a customization or workaround to allow Mac->Win keymapping through Guacemole HTMl5 interface?
I'm not sure its a none starter, but it is extremly difficult to use windows with nearly no keyboard shortcuts :).
Thanks!
On my mac I use BetterTouchTool to get around this issue. It's not great though because your guacamole will still register the original keypresses from time to time. I have been looking for a workaround as well and have thus far not been able to find one :/.

OS X 10.10.5 and Windows 7 file sharing

So what I want to do is share files between windows 7 pc and Macbook Pro Yosemite 10.10.5 using ethernet.
I managed to make it work really easily in the past but now it doesn't.
I have looked a bunch of tutorial online,I changed sharing settings,I have changed the settings of the ethernet adapters infinite times(manual ip,same subnet mask).I have restarted both computer a dozens times each, I have modified the register LmCompatibilityLevel with the values 1-4 with no luck.
After my fresh install of Windows 7 I managed to connect to windows PC from the macbook with the Go to Server tool over WiFi on the other hand the windows pc still can't see my macbook and on the network settings the LAN connection is displayed as "Unidentified".
I have no clue what I should do.At this point I just look at forums,tutorials and follow them blindly.
Maybe there is a third party program that could help me?
[ Windows 7 32 & 64bit(I tried both) , MacBook Pro (13-inch, Mid 2009) ]
I run Yosemite 10.10.5 on a 2013 Macbook. I got here researching a floating-point calculation issues I seem to be having with the Mac, running some machine-learning software.
I have to share files among various Windows machines, the Macbook (running 10.10.5), and a bunch of different Linux boxes. To make it seemless and simple, I've put ssh and scp on all of them, and just use "scp" to copy files between any pair if machines or devices. "scp" stands for "secure copy". You can also use "ssh" (secure shell) to log into one machine from another.
The syntax for scp looks like this:
scp myfile_here.txt MyUserID#SYSTEMname:/home/MyUser/filedir/.
The above command, which you enter in "cli" (command line interface) mode (basically just a terminal window or a Windows CMD shell), will securely copy "myfile_here.txt" over to the machine called "SYSTEMname", and put it into directory "/home/Myuser/filedir/". The little dot just means give it the same name. Instead of SYSTEMname, you can also use the numeric address of the machine (in either IPv4 or IPv6). On a windows machine, you can go to CMD shell, and type: "ipconfig /all" to get the machine's IP address. On the Macbook, you can click the little wifi indicator, then select "Open Network Preferences", click "Advanced", click "TCP/IP", and get the IPv4 address of you Macbook. OR, start up a "Terminal" window, and enter "ifconfig", and look at what is says for "en1". So then, the 'scp' command becomes:
scp myfile_here.txt MyUserID#nnn.nnn.nnn.nnn:/home/MyUser/filedir/.
where nnn.nnn.nnn.nnn might be something like 192.168.112.170
or whatever number you need to use (this example is an IPv4 style number)
I think scp and ssh might be included on the Macbook. If not, then maybe you have to download the "command line utilities" from Apple, which you can do, if you install the "Xcode7.2.1" C language compiler from them (it is free.) Google around and you can find a link.
To get ssh and scp on a Windows-7 machine, you need to install the Cygwin stuff. (See link below). You will also need to have the OpenSSH package, which may be installed as part of Cygwin. I put a link to a site that explains this. Check lots of sites. Don't just blindly install stuff without understanding exactly what it is doing. There is a real learning curve here, but it is worth spending the time to climb it.
If you get a Raspberry PI or jailbreak an old iPad, you can put the same ssh and scp programs on them, and then share files (including big video and music files) using these same programs. You will need to spend some time learning Linux stuff (the programs and the various utilities), but it will be time well spent, if you plan to do any work with computers and modern devices. Just google-search "ssh and scp" and read.
If you are using an older windows box (maybe you need to get some files off it), you can try "putty", which is just a graphic interface for the scp and ssh utility programs. Here are some URLS:
Putty: http://www.math.utah.edu/~beebe/software/ieee/
SSH: https://support.suso.com/supki/SSH_Tutorial_for_Windows
Linux ssh and scp: https://linuxacademy.com/blog/linux/ssh-and-scp-howto-tips-tricks/
SSH and SCP on Windows-7: https://www.question-defense.com/2010/01/07/how-to-install-scp-and-ssh-on-windows-7-using-cygwin
Just read this below. I think you have to enable ssh and scp on Mac OSX to get it to work. Apple has it turned off by default, but you can turn it on. Here is a site that explains this:
http://osxdaily.com/2011/09/30/remote-login-ssh-server-mac-os-x/
Hope this is helpful.

UIAutomation won't work in Windows Server (VPS) if I am not connected via RDP

I have script which uses mircrosoft's UIAutomation to automate an application. The script is inside a VPS running Windows Server 2012. The script works perfectly while I am connected to the VPS via Remote Desktop (RDP).
When I am not connected, the script seems to be stuck on SetFocus for a object... which leads me to believe that the script needs a Display/Screen/Session in order to work... but I am not sure if it is possible to do it while I am not connected to the VPS.
I can see 2 possible solutions here, either modify the script in someway to work in this environment or make the VPS have a virtual desktop while I am not connected (this solution might be more related to Server Fault rather than StackOverflow).
I am very confused, thanks for the help in advance :)
I managed to workaround the issue by actually connecting to the server to itself (to 127.0.0.1) via RDP so that it will always have an active RDP session for the automation script to run.
I am not happy with the results but it works... I cannot give clear instructions on how you would need to modify the settings in Windows to allow RDP connections from self, it was a one big trial and error process, I have to modify some policies in the Group Policy Editor and then some stuff that I don't remember.
There is another downside to this, a Windows server will allow 2 simultaneous connections to it but by using this method we are reserving a slot so only 1 connection at a given time is possible, something to be aware of.

Ipython notebook not working on my Firefox browser, even though the command prompt window seems to be fine

I've been using IPython ever since I can remember (and I have a pretty good memory), both for Python and for Julia. However, lately there seems to be an issue with getting it to work on my browser. I use ver. 50.1.0 of FF and my IP software is up-to-date. The program launches fine (i.e. without any errors), initiating a local host at port 8888, but the browser never gets the memo to start a new tab to render whatever IPython sends to that address. Any suggestions?
Apparently this has to do with some update or something that I've done recently. When I go to the local host address I can access the notebook. Even though this is less than ideal, as I have to take an additional step in order to use IPython, it's not crucial.

Simplest way to get access to a remote server for computing tasks

I'm working on some academic research projects involving scraping large data sets from the web using Python. It's been inconvenient to work on my academic institution's Linux server because (1) I don't have superuser access, meaning I'm dependent on the IT staff to install my packages, and (2) my disk quota is somewhat limited (I would ideally want ~10 GB). What is the simplest way for me to get access to a machine that solves these problems? I don't need huge processing power; I just need access to a reasonably fast machine that runs 24/7, so that my programs can run continuously, and above all, something very simple to get running, use, and maintain, since I have a few non-CS people working on this project with me. Linux would be preferable, but I'd consider Windows too.
I'm aware of Amazon Web Services, but am wondering if there's something more appropriate to my specific needs.
By the way, it would be a huge bonus if I could get some sort of remote desktop access to this machine so I wasn't limited to using SSH and SFTP.
Suggestions?
EDIT: I can't use VirtualBox or Virtual PC because I need the program to be running around the clock, and I need to turn off my laptop often, etc.
If you do want to stick with running on your CS department's machines, use virtualenv to solve your package installation woes. And if disk space is an issue, you could use S3 (and perhaps FUSE) to store huge amounts of data extremely cheaply.
However, if that's not really what you're after, I can recommend Slicehost very highly. They give you a virtual private server - so you have complete control over what gets installed, users, admin, etc.
In principle, it's very much like EC2 (which I prefer to use for "real" servers), but has a friendly interface, great customer service and is aimed at smaller projects like yours.
Use x11vnc with ssh.
'sudo apt-get install x11vnc' on your remote server.
Once you have that, you can access your remote server via vnc, but the great thing is that you can tunnel vnc over ssh like so:
ssh -X -C -L 5900:localhost:5900 remotehost x11vnc -localhost -display :0
For more details see the x11vnc manpage.
Or, just setup remote desktop -- (which is actually vnc) on your linux distribution. Most distributions come with a GUI to configure remote desktop access.
If you have a linux machine you can use, then SSH -X will allow you to start GUI programs. It's not remote desktop, but it's close.
ssh -X whoever#whatever.com
firefox
Then bam. A firefox window pops on your desktop.
I have been pretty happy with TekTonic Virtual Private Servers. It's a virtualized environment, but you have full root access to install any packages you need. I'm not sure what your CPU and memory constraints are, but if they aren't too extensive then this should fit the bill nicely for you. I don't know if you would be able to enable a remote desktop as I've never tried but it may be possible to install the requisite packages.
The plans range from $15/mo to $100/mo, the $15/mo plan comes with 294MB RAM, 13GB disk space, and 2.6GHz max CPU speed. I ran on that plan for quite a while and eventually moved up to the next level up with double the disk/cpu/mem, and I've been quite happy with it. I've been with them since 2003 and have yet to find anyone who offers equivalent plans at these prices.

Resources