🔗
Networking concepts
  • Introduction
  • DNS
    • Introduction
    • DNS query
  • SSH
    • Introduction
    • Basics
    • SSH tunneling
      • Direct SSH tunnel
      • Reverse SSH tunnel
      • Dynamic SSH tunnel
    • SSH public key authentication
    • Port forwarding with virtual interface
    • sshd
    • scp/sftp
  • 🔫Networking tools
    • configuration & information
      • ip
      • netstat/netsh
      • ifconfig/ipconfig/iwconfig
      • arp
      • route
      • ps
      • ss
      • lsof
      • pgrep
      • nmcli
      • Information about services/processes & PID
    • monitoring & troubleshooting
      • ping
      • tracert/traceroute
      • mtr
      • iperf3
    • domain information
      • dig/nslookup
      • whois
      • host
    • capture & analysis
      • tcpdump
      • ngrep
      • wireshark
    • firewall & security
      • iptables
      • nft
    • services
      • dnsmasq
      • hostapd
      • RDP/VNC
      • ngrok
      • networking.service
      • NetworkManager.service
      • nginx
      • apache
      • nfs
    • miscellaneous
      • cURL
      • wget
      • netwox
      • netcat
      • openssl
      • socat
      • ftp
      • smbclient
    • proxy & tunneling
      • proxychains
    • Programming/scripting
      • Python
      • C
  • 🤩Interesting concepts
    • Simple tips & tricks
    • Network hole punching
    • SSH Over HTTPS
  • Network ports & services cheat sheet
    • 20/21/tcp ~ ftp
    • 22/tcp ~ ssh
    • 23/tcp ~ telnet
    • ...
  • For-fun projects
    • Raspberry pi + Windows machine experiments
Powered by GitBook
On this page
  1. SSH

Basics

Basic connection (to get a remote shell)

  1. Verify that SSH is running on the server

    • Refer to the section on sshd

  2. Retrieve a remote shell

$ ssh -i [identity_file] user@server

# eg. Connect to server address 10.10.10.10 using a key stored 
# in key.pm for the user jarrett
$ ssh -i key.pem jarrett@10.10.10.10

-i identity_file

Selects a file from which the identity (private key) for public key authentication is read.

Execute remote commands on the SSH server

# basic command
$ ssh user@server command1
$ ssh user@server 'command2'

Other common flags

  1. -p Specifies which port to connect to (default is 22)

PreviousIntroductionNextSSH tunneling

Last updated 28 days ago

ssh(1) - Linux manual page
How To Run / Execute Command Using SSHnixCraft
Logo