Troubleshooting the error "pscp is not recognized as an internal or external command" occurs, it usually indicates that the PSCP (PuTTY Secure Copy) executable is not accessible via the system command path. PSCP is a software that uses the SSH protocol to securely transfer files between a local system and a remote server.
When this error occurs, it indicates that the system is unable to locate the PSCP command. To fix this problem, make sure the directory containing the PSCP executable is in the system path environment variable. This allows the command prompt or terminal to find and run PSCP without having to specify its complete path. The procedure differs slightly depending on whether you're using Windows, Linux, or macOS.
Once correctly set up, you should be able to use PSCP seamlessly for secure file transfers. Here are some steps to resolve this issue:
Find PSCP:
Navigate to the directory where PSCP is installed on your system. This is usually the same directory where PuTTY was installed.
Also ecounter in PuTTY using the SFTP to upload file to Oracle server.
Add PSCP to PATH:
Once you've found the directory, add it to your system PATH environment setting. The PATH variable specifies the directories in which the command prompt or terminal looks for executable files.
On Windows:
Click to the Start menu, search "Environment Variables”, and then click "Edit the system environment variables. Find and select the Path variable under the System variables section, then click Edit. Add the path to the directory containing PSCP. To close each window, use the OK button.
On Linux/Unix:
Open a terminal window and edit your shellprofile file (/.bashrc, /.bash_profile, /.zshrc, for example). At the end of the file, add the following line:
export PATH=/path to/pscp directory:$PATH
Replace /path to/pscp directory with the actual path where PSCP is installed. Save the file.
On MacOS:
Open a terminal and change your shell profile file e.g .bash profile. Add the following line:
export PATH=/path to/pscp directory:$PATH
Save the file and restart the terminal.
Check the Installation:
Type pscp on a terminal or command prompt window. The "not recognized" error should no longer appear.
Finally, adding the directory path where PSCP is placed to the system path environment variable solves the "PSCP is not recognized as an internal or external command" problem in PuTTY during file transfer. When the command prompt or terminal cannot find the PSCP executable, this error occurs. User can successfully execute PSCP commands for secure file transfers without facing recognition issues by following the procedures to update the path variable.