Skip to content

Comment on Python string literals are kinda funnyparent

Comments

Wow, I didn't know this either. I find it a bit crazy. It must make no sense without syntax highlighting. But I suppose who writes code without highlighting any more?

It's been a long time since I've had to SSH into a box to fix an issue in production. But it is comforting to know that I _could_.

VI (not even VIM) on minimal Debian installs does not have syntax highlighting.

How often do you have SSH access to a box but don't have SFTP access?

Most IDEs support editing files on a remote machine through SFTP.

It would be scp, not sftp, but I often don't know what I'm about to edit until I get in there and dig around.

No, I was talking about SFTP, not scp. OpenSSH server has SFTP enabled by default. You can mount it using sshfs or browse it using any SFTP client (or any program with embedded SFTP client, which is most IDEs).

So, if "digging around" means looking at folders' structure, you can do it through SFTP without copying everything (unlike scp or rsync).

And if digging around means running commands, nothing prevents you from having a session for running commands open in parallel.

I block [s]ftp at the firewall and disable it. I also keep ssh open only after port knocking. After reading logs and such, it's easier to open files with copy and paste via screen or tmux. Or even `Atl-.` depending on what I'm doing, framework, etc.

How exactly do you block sftp at the firewall if it uses the same port as ssh? From the firewall's perspective it is just some encrypted traffic inside ssh tunnel. I think that you might be mistaking sftp with ftps (ftp through ssl/tls tunnel), these are different protocols. I suggest you try connecting to any box you have access to using Sftp protocol and ssh credentials and see the result.

I completely forgot that sftp is on 22. Like I said, I block the port until it is properly knocked. In any case, I usually don't need the convenience of an IDE. It's much easier for me to just do everything over ssh. My IDEs (Jrtbrains, VS Code) use VIM keybindings too. And I could just as easily apt get vim on the server.

In any case, it's literally been years since I've had to.

Interesting read. I had no ides that they switched the parser https://peps.python.org/pep-0617/

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.