I’ve been needing to use an embedded system that had network support but lacked many of the (useful) utilities that we’ve gotten used to. I needed this device to talk to an HTTP endpoint (an array of relays accessible via Ethernet) that was configured with basic authentication. With curl
, this is a simple case of running:
curl username:password@10.0.3.20/outs.cgi?out0=0
curl
happily understand this syntax and correctly negotiates basic auth. Without curl
, this task gets a little more involved…
I recently needed to access a resource that was only available from a remote Linux PC (i.e. my machine → remote Linux PC → network resource). The problem? There’s no GUI, no X Server I only have SSH access. The solution? One option is to set up a local port forward (ssh -L local_socket:host:host_socket
), but this is limited to only a single end point and won’t work if the remote network resource redirects traffic to another port. This would work if we are, for example, talking to a web server over HTTP (port 80), but we would need to create a separate rule for HTTPS (port 443) and any other port required (e.g. for web sockets).