Plink Access Granted: Nothing Occurs Even with Correct Credentials?
Plink is a command-line interface (CLI) tool for the SSH, Telnet and Rlogin protocols. It is based on the PuTTY toolkit and provides a more scriptable interface to the SSH protocol. Plink is often used in system administration tasks, automated testing, and other scenarios where a program needs to interact with a remote server securely.
Using Plink
To use Plink, you need to provide the following information:
plink.exe: the Plink executable-ssh: the protocol to use (SSH in this case)-l LOGIN: the username to log in with-pw PASSWORD: the password for the user-N: indicates that no command will be sent once logged in-R <remoteip>:47108:127.0.0.1:10808: specifies a remote port forwarding-R <remoteip>:11597:127.0.0.1:14434: specifies another remote port forwarding<remoteip>: the IP address of the remote server
After executing the command, you should see the following message:
Using username "login".Access granted.Press Return to continue.Nothing Occurs After Access is Granted
If you see the "Access granted" message, but nothing happens after pressing Return, it may be due to one of the following reasons:
- The user is logged in, but no command is specified. The
-Noption in the command indicates that no command will be sent to the remote server. If you want to run a command after logging in, you need to specify the command after the user name. - The remote server does not have a shell configured for the user. Some servers, such as those used for specific applications or services, do not provide a shell for users. In this case, logging in will not display a command prompt or allow you to enter commands.
Checking Connections
To check if the connections are established, you can use the following commands:
netstat -an | findstr 10808: checks if the first port forwarding is establishednetstat -an | findstr 14434: checks if the second port forwarding is established
If the connections are established, you should see the local and remote IP addresses and the port numbers in the output.
References
-
O'Reilly. Using SSH, 2nd Edition
-
PuTTY. PuTTY Home Page
-
SSH.COM. SSH vs Telnet