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:
-
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.
-
Login:
- Once connected, you'll be prompted to enter your username and password to log in to the remote server.
-
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.
-
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.
-
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.
-
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:
-
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.
-
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.
-
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.
-
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.
-
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.
-
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:
-
Navigation and File Management:
ls
ordir
: List files and directories in the current directory.cd
: Change directory.pwd
: Print the current working directory.mkdir
: Create a new directory.rm
ordel
: Remove/delete a file.rmdir
orrd
: Remove/delete an empty directory.cp
orcopy
: Copy files or directories.mv
ormove
: Move/rename files or directories.cat
ortype
: Display the contents of a file.
-
File Editing:
nano
,vi
, orvim
: Text editors for creating and modifying files.- Use the appropriate editor command followed by the filename to open and edit files.
-
Process Management:
ps
: Display a list of currently running processes.kill
: Terminate a running process.top
orhtop
: Display real-time information about system processes and resource usage.
-
System Information:
uname -a
: Display system information, including the operating system and kernel details.df
ordu
: Display disk space usage information.free
: Display memory usage information.ifconfig
oripconfig
: Display network interface configuration details.
-
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.
-
User Management:
sudo
: Run a command with administrative privileges.adduser
oruseradd
: 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.