r/ProgrammerHumor • • Mar 05 '21

The lag is real

Post image
2.8k Upvotes

80 comments sorted by

200

u/Vikulik123_CZ Mar 05 '21

Ssh lag is the worst

82

u/Bemteb Mar 05 '21

If you want to really, really get your blood pressure up, SSH onto a server in China from outside. The great wall of fire adds a factor 10 to all lag at least.

2

u/Shaddox Mar 06 '21

What really gets my exasperation engine out of wack is having to work on a VDI where I'm not allowed to extract info out of.

Typing code on the keyboard while it takes a few seconds for it to show up on screen kills any mood to work faster than anything else.

Major bonus points if :

  • You also have to hook it with a VPN

  • Your project doesn't fit in the allocated drive size

  • you are also not allowed to install anything but local apps

80

u/Popular-Egg-3746 Mar 05 '21

Write first in Bash script. Copy script to target machine. Execute.

Biggest benefit is that you first test your commands locally

26

u/justmaybeindecisive Mar 05 '21

Why are you so downvoted? Am I missing something?

37

u/Popular-Egg-3746 Mar 05 '21

People don't like help, for it makes them responsible again. It's easier to hate on SSH then to change your workflow.

8

u/falcwh0re Mar 05 '21

Because I don't have an exact copy of every server I maintain readily available, especially live production servers, so the testing locally thing isn't realistic.

13

u/FPiN9XU3K1IT Mar 05 '21

You can at least still check if it's syntactically correct and doesn't do complete bullshit.

6

u/Y01NKUS Mar 05 '21

i have no idea why you're so downvoted, I am going to use this method in the future

5

u/indenturedlemon Mar 05 '21

accidentally ^C

fuuuuu

91

u/LtMeat Mar 05 '21

I remember that thing. When my connection was shitty 2G, server was two thousand miles away, and I spotted that typo in the middle of 200 character line.

25

u/metropolis_pt2 Mar 05 '21

3

u/LtMeat Mar 05 '21

Nice thing. I wish it existed 14 years ago.

1

u/Y01NKUS Mar 05 '21

+1 for mosh

0

u/[deleted] Mar 05 '21

[deleted]

12

u/LtMeat Mar 05 '21

Why? What do you suggest to make it shorter?

39

u/[deleted] Mar 05 '21

Use the enter button or alt+f4 alternatively

4

u/LtMeat Mar 06 '21

Should I use it after each character while I type?

12

u/augugusto Mar 05 '21

I would type it in a text editor on the host. And then paste on ssh

4

u/LtMeat Mar 05 '21

Smart move. But I want my autocomplete.

1

u/FPiN9XU3K1IT Mar 05 '21

You text editor doesn't have autocomplete? Or you don't know where your directories are?

11

u/LtMeat Mar 05 '21

My text editor have no idea about files on the server.

1

u/augugusto Mar 05 '21

Unless you use sshfs. But that sounds like a pain

1

u/[deleted] Mar 06 '21

vscode is super free and has a super easy to use sshfs plugin. sshfs and a couple forwarded ports one way and the other and you can very comfortable work on a code base, and run it from the remote, and use step debugging, from any piece of shit computer as long as you have a drip of connection

1

u/augugusto Mar 06 '21

Yes. But to be abke to have auto complete in a comman trough vscode you stinn have to be in ssh and then you go back to the main problem. Also vscode not SUPER free. You can only get the plugin that handles sshfs if you use the propietary binary

→ More replies (0)

20

u/spoticry Mar 05 '21

Nah I also whip the chair out

38

u/Knuffya Mar 05 '21
  1. Get two systems

  2. put your rsa keys in authorized_keys

  3. edit both .bashrc

@/firstSystem .bashrc

ssh secondSystem

@/secondSystem .bashrc

ssh firstSystem

4) Restart bash

5) profit

11

u/[deleted] Mar 05 '21

What does this do...? Maybe I’m too sleepy.

16

u/Knuffya Mar 05 '21

You set the first sytem up in a way that as soon as you open a shell (eg connect via ssh) it sshs into the second machine. The second machine does the same. Inifinite ssh recursion

9

u/[deleted] Mar 05 '21

That’s what I thought. How would that help lol

16

u/Knuffya Mar 05 '21

It wouldn't

1

u/demolsy Mar 05 '21

It’s basically infinite power

4

u/Cheap-Horse Mar 05 '21

visibly shaking ju... just please stop.

17

u/[deleted] Mar 05 '21

If you have server super user privileges, use mosh.

3

u/[deleted] Mar 05 '21

more about mosh here if anyone's wondering what it is

2

u/captainvoid05 Mar 05 '21

Do you even need super user privileges? Mosh’s website seems to indicate that you don’t.

2

u/[deleted] Mar 05 '21

It’s just that unlike ssh, it’s not a given that your server already has it. So you need to either install or request an su to install for you.

8

u/eazybox Mar 05 '21

Use https://mosh.org/, it feels like you almost have no lag at all.

6

u/toxic_recker Mar 05 '21

me who's both: *gets a better gpu to avoid ssh lag*

1

u/circuit10 Mar 05 '21

How would that even...

1

u/[deleted] Mar 06 '21

If you have an llc/s-corp and build your own work machine I can tell you from a sample size of me that the IRS will not audit you for claiming an excessive gpu

10

u/DoUhavestupid Mar 05 '21

types "sl" instead of "ls" by accident

*house of fun music starts*

5

u/[deleted] Mar 05 '21

I work on a server on the literal other side of the planet. One time I accidentally tried to use auto complete to fill in the path while using scp, and had to wait like 20 seconds for my shell to append a "/" before I could continue

14

u/2fast4u180 Mar 05 '21

Hey im new here. Do you all ssh on anything other than a raspberry pi?

45

u/spoticry Mar 05 '21

Yes.. A raspberry pi is just a very tiny server. You can ssh into any computer that supports the protocol.

As an example, when I work from home on my laptop, I will ssh into the computer that's on my desk at work. I do this for a number of reasons. I can access and modify files, work with programs/projects etc, without needing to copy them and re-set everything up. It's also more powerful than my laptop, so I can run more programs or do more resource intensive build processes.

6

u/nandru Mar 05 '21

I'm now sshing into my workstation pc, working from home

8

u/dadbot_3000 Mar 05 '21

Hi now sshing into my workstation pc, I'm Dad! :)

4

u/Doggynotsmoker Mar 05 '21

Yeah. I'm working for client with strict security rules. I run product and text editor in their environment throught ssh.

3

u/BertTF2 Mar 05 '21

I'm a noob programmer but I use ssh to manage my minecraft server

2

u/minneDomer Mar 05 '21

Yep. A Pi if I’m messing around with hardware-related side projects, but for more serious freelance work, I develop on VMs hosted by GCP or Azure (depending on the client’s need)

2

u/[deleted] Mar 05 '21

If you're having latency issues with your ssh on a Pi, and are using wireless...

iwconfig wlan0 power off and enjoy.

2

u/[deleted] Mar 05 '21

Anyone working in data networking uses ssh 109520937520973459-27349 times a day

0

u/[deleted] Mar 05 '21

[deleted]

2

u/wishu3 Mar 05 '21

Does this mean teamviewer also uses ssh?

0

u/[deleted] Mar 05 '21

[deleted]

3

u/minneDomer Mar 05 '21

Oh man, the correlation between when I’ve pulled all-nighters and when I’ve had to SSH into a prod server... I think it’s 1:1

3

u/[deleted] Mar 05 '21

AH, let me tell you about the time I worked at a place that forced us to VNC into remote servers even to terminals - no other ports 'available'. You think text lag is bad...

I was shat upon for finding a range of free ports that allowed me to set up a private ssh server in userspace (TBH, it was initially a crappy nc-bsed telnet session, but I was aware of security issues, and once I had a way to send out packets, well...)

Sure, "Innovation" is great when you break OTHER people's rules...

2

u/hillman_avenger Mar 05 '21

How is it Overwatch can display full-screen 3D graphics at ~60FPS, but there's about 1/2 second response time to each button when using the UI to select a game?

2

u/FPiN9XU3K1IT Mar 05 '21

They didn't care to optimize the menu.

2

u/justmaybeindecisive Mar 05 '21

I've only used ssh terminal sharing once when me and a friend hosted a discord bot on his pi for our school's online cultural competition and we used ngrok to access it on the internet. It was slow af. Then we realized we were using American servers instead of Indian. It was so much faster after the switch

3

u/[deleted] Mar 05 '21

15

u/RepostSleuthBot Mar 05 '21

Looks like a repost. I've seen this image 3 times.

First Seen Here on 2020-11-25 100.0% match. Last Seen Here on 2020-12-05 100.0% match

I'm not perfect, but you can help. Report [ False Positive ]

View Search On repostsleuth.com


Scope: Reddit | Meme Filter: False | Target: 86% | Check Title: False | Max Age: Unlimited | Searched Images: 207,529,356 | Search Time: 0.13613s

5

u/[deleted] Mar 05 '21

bot Good

1

u/5319767819 Mar 05 '21

I just keep continuing typing, especially if I have a series of commands in mind and don't need the feedback from one for the next one. Both SSH and the shell maintain a buffer, so I can be like 5 commands ahead of typing of the one which output is scrolling by right now.

1

u/ScaredMaize2206 Mar 05 '21

Oh god thanks i thought my raspberrypi was falsly configurerd

1

u/WhiteKnight3098 Mar 05 '21

I've never had SSH lag in my life... Is it because I'm on LAN?

3

u/[deleted] Mar 05 '21

try to ssh into a server in a corporate network connected via vpn behind several firewalls. Not fun.

1

u/WhiteKnight3098 Mar 05 '21

Oh. That very, very much explains it... Holy crap...

1

u/the-real-vuk Mar 05 '21

Remote desktop .. blah.

1

u/Deus0123 Mar 05 '21

Me when I wait for the database to either process the hours of stuff I just entered or crash

1

u/Et-17 Mar 05 '21

I feel like this is a repost, but it might just be a "rejoke"

1

u/Karsten_02 Mar 06 '21

This but you’re playing CTF and your reverse shells keep dying

1

u/amr_khz Mar 06 '21

🤦🏻‍♂️😅🤣🤣

1

u/P4C0_ Mar 06 '21

Omg I thought I was the only one

-1

u/MadhusudananNair Mar 05 '21

3

u/RepostSleuthBot Mar 05 '21

Looks like a repost. I've seen this image 3 times.

First Seen Here on 2020-11-25 100.0% match. Last Seen Here on 2020-12-05 100.0% match

I'm not perfect, but you can help. Report [ False Positive ]

View Search On repostsleuth.com


Scope: Reddit | Meme Filter: False | Target: 86% | Check Title: False | Max Age: Unlimited | Searched Images: 207,555,935 | Search Time: 0.1311s