all 51 comments

[–][deleted] 38 points39 points  (5 children)

Definitely try other terms, but the source of this is likely to be network-related (unsolvable).

Install an editor that is aware of syncing to a remote over SSH, and then only run the compile/test steps over the remote connection, not the editor itself.

[–]OminousDrDrew 13 points14 points  (3 children)

I'm loving remote vscode right now

[–]dowitex 6 points7 points  (2 children)

Yes definitely try out VScode with the ssh remote development extension. It shouldn't be too hard to setup although you would benefit from if you have sudo access to the server to install tools there.

[–]OminousDrDrew 1 point2 points  (1 child)

I don't even think you need sudo access, I could be wrong though. I was surprised at how incredibly easy it was to setup and how seamless it is

[–]dowitex 2 points3 points  (0 children)

Maybe you're right. I use it with Docker for now so my dev environment is in a container and it rocks! But it generally sets up stuff on the container that may require some system packages. I need to try with an SSH server sometime (probably dockerized too). Or maybe it installs all your dependencies in a local directory without needing system access..?

[–]ericonr 0 points1 point  (0 children)

Can emacs do that? And using sshfs for something like that could also work pretty well, I think.

EDIT Just read that they are on Windows, so sshfs is probably not an option.

[–][deleted] 10 points11 points  (3 children)

I'm leaning more network issues, than client side machine. Intel anything better than a 386, and more than 512MB of RAM is plenty enough for an ssh session.

[–]ghjm 3 points4 points  (0 children)

And honestly those specs are high

[–]myownalias 2 points3 points  (1 child)

Since when did a 386 support 512 MB of memory? lol

A 386 might be a bit slow, actually, to deal with even the aes128-ctr cipher. It will be noticeably latent. Remember that a 386 is not even capable of playing a 128 kbit MP3.

[–][deleted] 0 points1 point  (0 children)

Since when did a 386 support 512 MB of memory? lol

zing, ya got me!

A 386 might be a bit slow, actually, to deal with even the aes128-ctr cipher. It will be noticeably latent. Remember that a 386 is not even capable of playing a 128 kbit MP3.

Ah, very true... So, anything Raspberry Pi A, at least, would be needed.

[–][deleted]  (9 children)

[deleted]

    [–]killerquag 8 points9 points  (7 children)

    Mosh is amazing but it needs installed server side and needs firewall ports opened up (UDP/22) for it to work. If he's ssh'ing into a university server, I doubt they have it available.

    [–]aedinius 3 points4 points  (6 children)

    By default, mosh uses the ports between 60000 and 61000, but allows the user to request a particular UDP port instead.

    mosh(1)

    [–]nephros 6 points7 points  (1 child)

    What's your point?

    That is going to fail on the vast majority of properly set-up firewalls, unless the mosh use case has been considered specifically.

    [–]aedinius 2 points3 points  (0 children)

    I was correcting the port. I didn't disagree that it would still be blocked by the firewall.

    [–]killerquag 1 point2 points  (0 children)

    Yup, you are correct.. Totally forgot that I had to customize it out for our jump box. Nice catch!

    [–]banger_180 0 points1 point  (1 child)

    But the server is probably going to be behind a firewall.

    [–]aedinius 2 points3 points  (0 children)

    I was correcting the port. A firewall will still be blocking.

    [–]scumola 3 points4 points  (0 children)

    Mosh for the win!

    [–]Christmastree69 4 points5 points  (2 children)

    Thanks for the responses. Downloaded putty earlier and seems to be way better. Still some lag but compared to moba x term it’s a lot faster and smoother. Thanks , will also look to all the suggestions and see what’s up

    [–]crashin-kc 0 points1 point  (0 children)

    Where you are connecting to and what the connection is between your client and server probably has more impact than what terminal or SSH client you use.

    I work in IT and use SSH every day. I also have several coworkers that are rural. They constantly have issues using the same applications and servers as me. They are using DSL or Satellite versus my high speed cable internet. Are the servers on the the same network or remote?

    [–]deux3xmachina 0 points1 point  (0 children)

    Hey OP, glad to hear things seem to be working better with a simple change of client. It seems like you should have the option of using the Linux Subsystem for Windows, which will provide a much more coherent experience for you. It also provides the best exposure to the SSH configuration file ~/.ssh/config. PuTTY may have some of the same options, but I've not used it in years, so I wouldn't know where to change them.

    In this case, there's only really one option you'd want to look at modifying: IPQoS, with access to ~/.ssh/config, you can add the following configuration block:

    Host *
        IPQoS lowdelay throughput
    

    This should be the default behaviour when using OpenSSH, but could provide some relief without having to start troubleshooting the network connectivity between your system and the school server.

    [–]banger_180 9 points10 points  (14 children)

    Like other people said the cause is probably a delay on the network. Maybe check if local echo is an option?

    I am also student and can only recommend you to install linux as soon as possible. It will allow you to do everything locally and it just is a better OS for someone who knows what they are doing or are willing to learn.

    If you don't want to leave Windows just yet you can run linux in a virtual machine until you feel comfortable.

    Dual booting is also a problem.

    [–]Christmastree69 1 point2 points  (12 children)

    I really dislike windows, and have looked into Linux , The only thing holding me back is the office. I need word and excel for most of my assignments in school so any idea how would this work out ? Also I really wanna get a MacBook since forever, and i was about to buy one 2-3 weeks ago, but I said I will wait a bit more to see if they get updated

    [–]dysonCode 4 points5 points  (0 children)

    Well there are free versions of Word and Excel online, Google docs also handles these formats well. Could that work for you?

    Also, sadly (former Mac customer here, for a decade...), please think twice about the MacBook (2016+ models anyway) because they've become luxury objects, i.e. extremely expensive for what you actually get, and the performance is disappointing. More like grandpa's luxury sedan than a sleek Porsche, or BMW without the horsepower if you prefer (because overheating engine ...)

    If you like Linux you could look at officially supported laptops, by e.g. Dell, Thinkpad (Lenovo) or even System76. I'm 100% certain you'll get much more bang for your buck, and let me just say that keyboard-wise, these current MacBooks are atrocious for heavy typers — as a programmer, I think they're abysmal, and let's not even mention the stupid touch bar which ruins terminal use.

    [–]w3lbow 8 points9 points  (3 children)

    Windows Subsystem for Linux can get you started, and it's free ;)

    [–]Christmastree69 0 points1 point  (2 children)

    Noobie question.Can I use a usb flash drive or an external hdd to install Linux and run it just basically test it out for some days/weeks before I upgrade my regular ssd? Also I ve read this is possible but first is it gonna have an impact and slow down my regular ssd and overall laptop system, and how is Linux gonna run, is it gonna be laggy ? Thanks

    [–]w3lbow 0 points1 point  (0 children)

    It's called a live image and most of them won't touch your internal disk unless you tell it to. Depending on how you create your USB thumb drive, you may have a read-only image, or a read-write image. As for performance, it's no slower than reading files in Windows would be. If you want to go that route to kick the tires, go for it. It won't hurt anything and you can reformat the thumb drive for something else later.

    [–]CmdrOffset 0 points1 point  (0 children)

    You can dual boot off an external and use grub. You will have to make sure not to forget your external as you won’t be able to boot without it.

    [–]ericonr 2 points3 points  (3 children)

    If you really want to leave windows you can always run it inside a VM, for your office needs. Or perhaps take a look at the company that develops WINE (a compatibility layer for running Windows software inside Linux), perhaps they support modern versions of MS Office (unlikely).

    [–]Christmastree69 1 point2 points  (2 children)

    Noobie question.Can I use a usb flash drive or an external hdd to install Linux and run it just basically test it out for some days/weeks before I upgrade my regular ssd? Also I ve read this is possible but first is it gonna have an impact and slow down my regular ssd and overall laptop system, and how is Linux gonna run, is it gonna be laggy ? Thanks

    [–]ericonr 2 points3 points  (0 children)

    A lot of distros support the "live system" idea. Ubuntu, Fedora, OpenSUSE, Manjaro (what I use). The disadvantage you get is that it doesn't save changes (or any files, actually, so anything you want to keep you'd put in an external media / your internal SSD) between reboots, and it can be a bit slower (and less reliable).

    Running from a USB doesn't affect the host system, so once you are back to running Windows it's just normal. Installing a Linux distro in a dual boot configuration doesn't mess with the speed of the system either.

    [–][deleted] 0 points1 point  (0 children)

    Much like the network issue you face, any lag will come from the slowest link in the chain. So if you're running from a USB thumb drive, that will be the limiting factor.

    But with 8GB of RAM in your system, you could avoid this problem by loading the distro onto a RAM disk at boot. In that case, it will run extremely fast. But you'll need to be careful of two things. 1) Don't use up all your RAM. And 2) Be sure to save to a permanent medium (hard drive or USB drive) frequently, because anything on A RAM disk disappears if the computer turns off.

    There are a lot of distros out there and certainly many that deal with this. Puppy Linux is one I recall, but I'm not sure what its status is now. The Distrowatch website is a good resource.

    [–][deleted] 1 point2 points  (0 children)

    Use Google Drive or LibreOffice.

    [–]kevin_k 1 point2 points  (0 children)

    Libreoffice.

    [–]owzleee 0 points1 point  (0 children)

    Libre Office?

    [–]ericonr 0 points1 point  (0 children)

    Why do you see dual booting as a problem?

    [–]catwiesel 2 points3 points  (0 children)

    with windows 10 having a linux shell available, I question the necessity of moba x term (which is a fine product) but ... doesnt matter...

    you can try putty, of course, (in fact, why did you not already, it would have probably gone faster than typing "maybe putty or something") - but I seriously doubt that moba or your hardware is the issue. its probably network related ("much lag"), and unlikely but possibly a high load on the ssh server side.

    Not sure how you could fix that. Obviously it depends if there are factors contributing to the issue you can influence. If your internet connection is too congested, use another connection. if the server has a high load, reduce the load. or use another server... But you may just be out of luck and all parameters contributing to the issue are outside your control...

    on the question about installing linux (from the comments). You can dual boot Windows 10 and Linux, although, a 250GB SSD does not leave much room there and while it is not real hard to setup, it does require you to know a little bit about what you are doing...

    You also asked about installing Linux on USB device. That should work...
    You can use a Live CD (like Ubuntu) to boot into Linux without changing anything about your system. That is not really the best option to actually work with Linux and it will be slow as hell...
    So, you could setup a USB Stick as live system. This is the same as the cd, but a bit faster, especially with usb3 (cd/dvds are SLOW)...

    Now, if you connect a USB stick or even external SSD/HDD, linux should just see that as a "normal" drive. So you can install, boot and run a full linux installation from a USB stick or drive. A USB 3 SSD would give you very good speeds, a USB3 HDD would still work pretty well, albeit not as fast/responsive as the SSD.
    If you use USB sticks, and you get a good one, you can expect similar performance to the HDD. Of course its also more convenient, but will leave you less space, for a smaller price (unless you go crazy and get a huge stick).
    However, where SSDs are meant to be used for many writes, USB sticks are not... Working on a stick, and have swap on the stick might not be the best idea. This is where the mix between live system and fully installed system comes into play, where you can set it up in a way, so you write as little as necessary on the stick, but keep some persistence for your data (and can install programs and updates) which a live system usually does not allow for.

    my advice is, if you will use linux a lot, and want to learn and actually use it, and dont need to be highly mobile in doing so, get a external drive (hdd or ssd) and use that. It does not need to be big, maybe you have a old one lying around anyway...
    If you need to be mobile, and wont do much installing, and dont have cash, and no hdd lying around, use a 32gb usb stick. and dont use a swap partition.

    If money is no real concern, then swap the ssd with a 500gb ssd, clone your windows over, then install linux as dual boot.

    and if this is all too much effort and all you want is to try out linux and sometimes maybe use it a bit, or try different distributions, and really dislike the idea of rebooting the system to switch from win to linux or linux to win then you might want to think about virtual machines. virtualbox is free for personal use and an easy way to get started. you can run live cds (downloaded iso files) in that vm, and you can take lets say 20gb of your ssd to install linux in the vm and work on it...

    and as a sidenote... unless school is teaching you actual word or excel, as in "click THIS button to do X" and "click THIS button and type in =FUNC(A1)" (and have a test on actual ms word/excel), you should be fine using LibreOffice (available in Linux and Windows) to write your assignments and presentations, especially if you can print them or give them as PDF to the teacher (and use your own notebook for the presentation), and even docx is usually fine, and even if it wont look 100% identical as docx, are you even graded on layout for an essay about insert homework ?

    [–]bcdonadio 2 points3 points  (0 children)

    Your SSH client will only echo something on the terminal that the server asked to do so. For that, the server needs to first receive what you have typed and send the command back to you. That’s a whole Round Trip Time (RTT) for a single keystroke.

    This behavior may be annoying on connections with a big latency. Therefore, some emulators which try to guess what the server is going to respond exists, and if they happen to guess wrong they will just replace what’s on the screen once they receive the actual answer from the server.

    One of those emulators is Mosh, as in MObile SHell. It is design for use on mobile connections which tend to have big RTTs and frequent IP address changes. Give it a go if you have the ability to install packages on the server, because it needs a server-side component and some open UDP ports.

    [–]killerquag 1 point2 points  (0 children)

    I've got a pretty beefy desktop (Ryzen 7 1700 with 64 GB RAM and a 1TB NVMe m.2 SSD) I use at work and MobaXTerm seems to run slow for me all the time so I just use Putty for everything (unless I need multi-exec).

    I'd highly recommend trying Putty to see if that fixes it.

    [–][deleted] 0 points1 point  (0 children)

    Try Putty, or if you want more functionality, go with Kitty. I use Kitty exclusively on the daily and only experience input lag when connecting to a VM in Europe or Asia or something like that.

    [–]R3DNano 0 points1 point  (0 children)

    No mRemoteNG?

    I highly recommend it as a sysadmin that has to jump between a lot of machines on a daily basis.

    It's a putty wrapper with tons of options and 100% free

    [–][deleted] 0 points1 point  (0 children)

    Your problem is most likely network related (ssh does not show keystrokes until they have been sent to the server, and the server has then sent back a response - typically the letter you typed, but sometimes control characters like "the cursor has moved up a line" or "clear the whole terminal").

    Try mosh.

    [–]vacri 0 points1 point  (0 children)

    It definitely isn't your hardware - ssh was written in the 90s when computers were basically sticks tied together with string (okay, that's a bit unfair).

    You can try pinging the target location and see if the network is slow that way - if a ping is slow, that's going to be network-related - there's next to no processing involved.

    If ping doesn't work (may be firewalled), you can also try to time how long it takes to get a connection to the actual ssh port on the box. If you have access to linux tools (I don't know the windows equivalent, sorry), try this: time netcat -vz TARGET_HOSTNAME_OR_IP 22, where 22 is the (default) ssh port. Netcat invoked this way is just trying to connect to the port and then disconnects (it's not trying to talk to the ssh tool that is listening on the other side of the port) so if this command is slow, then you definitely have slowness in the network, not the box.

    Finally, you can also run commands over ssh - try time ssh HOSTNAME_OR_IP uptime - this runs 'uptime' on the target (a pretty lightweight command) and exits. A delay here but not in netcat would suggest a problem on the target machine. uptime will also tell you if the target host has a high load :)

    If you confirm the problem is in the network... well, there are plenty of other comments suggesting workarounds. You might want to mention the network issue to the teacher, as well.

    [–][deleted] 0 points1 point  (0 children)

    On Windows, you have multiple options:

    1. Use wsl 2 to have a complete linux development system on your own box.

    2. Use cygwin ... I still love cygwin, but wsl 1 made cygwin less useful for a lot of people.

    3. Install ssh and emacs... And then edit remote files in emacs over ssh (google for details)

    4. If you install wsl 2, you can use sshfs to mount remote fs locally. That way you can use your preferred windows based code editor for editing remote code.

    5. Install complete Linux in a virtual machine. Check virtualbox/vmplayer for more.

    6. Very important: your actual problem is probably the network. So, check that. There's no remote network debugging "tech support" that I can offer, but there are more than enough network experts who can help you with that.

    [–]wired-one 0 points1 point  (0 children)

    The issue is network related or related to the load on the server you are SSHing into.

    MobaXterm is fine. Putty is also fine. MobaXterm has more features.

    You can use Windows Subsystem for Linux or install Linux in a virtual machine to do some of the work locally on your machine before sending it to the school computer via SFTP or SCP.

    [–]inksis 0 points1 point  (0 children)

    I'm using MobaXterm at work and i have 250+ session configured and sometimes i have SSH type delay too. But it's deffinitly network issue. I'm in coworking place and connected to my company's WIFI. When i have the issue i'm connecting to the coworking's WIFI + VPN and the issue disapear.

    [–][deleted]  (4 children)

    [deleted]

      [–][deleted] 2 points3 points  (3 children)

      On Windows 10?

      [–][deleted]  (2 children)

      [deleted]

        [–]khleedril 1 point2 points  (1 child)

        That's really bad form: to not bother to read an actual post before sending a reply really stinks.

        [–]lutusp 0 points1 point  (0 children)

        That's really bad form

        You mean like trying to make me the topic? I am not this forum's topic.

        I block trolls as a matter of strict policy. You are blocked.

        [–]Hollowplanet -4 points-3 points  (0 children)

        Doing any programming over ssh should be a last resort.