What is PuTTY and its commands ?

What is PuTTY and its commands ?

PuTTY is a popular SSH and Telnet client for Windows, primarily used to establish secure connections to remote servers. While PuTTY itself doesn't have its own set of commands, it provides a user interface through which you can execute various actions and interact with remote systems. Here are some commonly used PuTTY features and commands:

  1. Connection Setup:

    • Host Name or IP address: Enter the address of the remote server.
    • Port: Specify the port number for the SSH/Telnet service (default is 22 for SSH).
    • Connection type: Choose between SSH, Telnet, or other supported protocols.
  2. Login:

    • Once connected, you'll be prompted to enter your username and password to log in to the remote server.
  3. Terminal Emulation:

    • PuTTY provides terminal emulation, allowing you to interact with the remote system as if you were using a local terminal or command prompt.
  4. File Transfer:

    • PuTTY includes a companion tool called "pscp" (PuTTY Secure Copy Protocol) that allows secure file transfers between your local machine and the remote server.
    • Use the pscp command followed by the source and destination file paths to perform file transfers.
  5. SSH Tunneling:

    • PuTTY supports SSH tunneling, allowing you to create secure connections to services running on the remote server's network.
    • Set up local and remote port forwarding configurations to redirect traffic through the SSH tunnel.
  6. Saved Sessions:

    • PuTTY allows you to save session configurations for quick and easy connection to frequently accessed remote servers.
    • You can save sessions with specific settings and load them later for quick connections.

Note that the PuTTY user interface provides buttons, checkboxes, and dropdowns for most of these actions, making it unnecessary to remember specific commands. The above points outline the main functionalities that PuTTY offers.

Here are a few additional features and options you can use within PuTTY:

  1. SSH Key Authentication:

    • PuTTY supports authentication using SSH keys for enhanced security.
    • You can generate a key pair using PuTTYgen and then load the private key into PuTTY for authentication.
  2. Session Logging:

    • PuTTY allows you to log the output of your sessions for later review.
    • You can specify a log file to save the session data, including both input and output.
  3. Remote Command Execution:

    • You can specify a command or a series of commands to be executed on the remote server immediately after logging in.
    • Enter the command(s) in the "Remote command" field under the "Connection > SSH" category.
  4. Terminal Customization:

    • PuTTY offers various options to customize the terminal emulation, such as font, colors, window size, and scrollback settings.
    • You can access these options under the "Window > Appearance" and "Window > Translation" categories.
  5. Keyboard and Function Keys:

    • PuTTY allows you to configure the behavior of special keys, function keys, and keypad settings according to your preference.
    • Navigate to "Window > Selection" and "Window > Selection > Keyboard" categories to adjust these settings.
  6. Proxy Support:

    • PuTTY supports connecting through a proxy server, such as HTTP or SOCKS proxy, if required.
    • You can configure proxy settings under the "Connection > Proxy" category.

These are some of the notable features and options available within PuTTY. Remember that PuTTY has a comprehensive user interface, so you can explore the settings and options to tailor the client to your specific needs.

In PuTTY, you primarily interact with the remote system through the terminal emulation interface. The commands you use in PuTTY are the same as the commands you would use in a regular command-line interface of the remote system, depending on the operating system and shell you are using. Here are some commonly used commands in PuTTY:

  1. Navigation and File Management:

    • ls or dir: List files and directories in the current directory.
    • cd: Change directory.
    • pwd: Print the current working directory.
    • mkdir: Create a new directory.
    • rm or del: Remove/delete a file.
    • rmdir or rd: Remove/delete an empty directory.
    • cp or copy: Copy files or directories.
    • mv or move: Move/rename files or directories.
    • cat or type: Display the contents of a file.
  2. File Editing:

    • nano, vi, or vim: Text editors for creating and modifying files.
    • Use the appropriate editor command followed by the filename to open and edit files.
  3. Process Management:

    • ps: Display a list of currently running processes.
    • kill: Terminate a running process.
    • top or htop: Display real-time information about system processes and resource usage.
  4. System Information:

    • uname -a: Display system information, including the operating system and kernel details.
    • df or du: Display disk space usage information.
    • free: Display memory usage information.
    • ifconfig or ipconfig: Display network interface configuration details.
  5. Remote Connectivity:

    • ssh: Connect to another remote server via SSH.
    • ping: Check the connectivity to a remote host or IP address.
    • scp: Securely copy files between local and remote systems.
  6. User Management:

    • sudo: Run a command with administrative privileges.
    • adduser or useradd: Create a new user account.
    • passwd: Change the password for a user account.
    • su: Switch to another user account.

These are just a few examples of commonly used commands. The specific commands and their usage may vary depending on the operating system and shell of the remote system you are connected to.