$ host domainname.com
or more detailed info by using:
$ dig domainname.com
curl --data "param1=value1¶m2=value2" https://example.com/resource.cgi
curl --data "param1=value1" --data "param2=value2" https://example.com/resource.cgi
curl --data "" https://example.com/resource.cgi
curl --request POST https://example.com/resource.cgi
lsof command is used to list open files.
$ lsof -i TCP:3000
ssh-keygen -t rsa -b 4096
scp -P 2222 id_rsa.pub firstname.lastname@example.org:.ssh/authorized_keys
mv id_rsa domain_rsa
Host domainName Hostname domain.net IdentityFile ~/.ssh/domain_rsa User www
“User” is the username for logging over ssh
Host x Hostname full.host.name.com (or 184.108.40.206) User <myuser> IdentitiesOnly yes IdentityFile ~/.ssh/id_x_ed25519
Give hosts short names so you can
Host * at the beginning of the config file for global settings
Host * Ciphers aes128-ctr Compression yes ServerAliveInterval 120 ForwardX11 yes
With this setup, typing
ssh example is equivalent to
ssh -XCY -c aes128-ctr email@example.com
which definitely saves some keystrokes.
Generate identities for some machines
` ssh-keygen -t ed25519 -f ~/.ssh/id_x_ed25519`
use ssh-copy-id to copy the identity to the target machine so it lets you in:
` ssh-copy-id -i ~/.ssh/id_x_ed25519.pub x`
or if your machine doesn’t have ssh-copy-id:
cat ~/.ssh/id_x_ed25519.pub | ssh x "cat >> .ssh/authorized_keys"
Help about the ssh escape sequence:
In your .ssh/config, add:
ServerAliveInterval 5 ServerAliveCountMax 1
What happens is that ssh will check the connection by sending an echo to the
remote host every
ServerAliveInterval seconds. If more than
echos are sent without a response, ssh will timeout and exit.
Useful for accessing servers behind a firewall, or using your own server as a proxy to bypass a bottleneck in the network.
$ ssh -J user1@host1 user_final@host_final
ssh -D9090 user@remote
Then, in Firefox, set it to use a SOCK5 proxy of localhost:9090 and “Proxy DNS when using SOCKS v5”. Now, when you use Firefox it is as if you are using Firefox on the machine you are SSH’d into(including DNS resolution!). This is really handy for things like accessing otherwise unreachable resources or other internal resources externally. It is also handy to be able to put all your web traffic as originating from a remote VPS with no advanced setup required.