Showing posts with label PuTTY. Show all posts
Showing posts with label PuTTY. Show all posts

Monday, April 5, 2021

Accessing a SSH host via a SSH gateway?

I wrote the notes about how to synchronize two SSH hosts via a middle SSH gateway and how to access a SSH host via a SSH gateway. The assumption there is to use ssh in OpenSSH. But what if we want to do the same with PuTTY? I actually locate the answer on Stack Overflow. This post is just a bookmark to the answer.

Simply put, it is to use PuTTY's proxy setup on the user interface when we create a session for a host, and the proxy command follows the following format,


plink.exe %user@%proxyhost -P %proxyport -nc %host:%port

or


plink.exe %user@%proxyhost -pw %pass -P %proxyport -nc %host:%port

Note the two comments.

  1. plink.exe is part of the PuTTY suite.
  2. The second plink.exe example is to use the password authentication. Since the password is part of the command line, someone can reveal the password by showing the process command line arguments, such as, using the methods in the notes written here. So use it with caution.

Saturday, May 30, 2020

Problem: Keyboard Input Echoed Back to Serial Terminal using PuTTY to Linux System

I enabled the serial console on a Debian Linux system. I used PuTTY to connect to the serial console. However, I encountered a problem, i.e., any keyboard inputs were echoed back to the serial console. The following screen shot perhaps explains the problem, e.g., when I enter user name, the user name is echoed back again, and when I enter the password, by default, the terminal shouldn't show anything, but it echoes it back.


A Stack Overflow thread discusses a similar problem, and I linked it below,
The thread led me to experimenting the terminal setting in PuTTY. The default setting of the "Line discipline options" is "Auto" for "Local echo", and "Auto" for "Local line editing" shown in the screen capture below. When using these settings, I encountered the problem I described in the above.


My fiddling with the settings tells me that the solution is to check "Force off"  for "Local echo", and "Force off" for "Local line editing" shown in the screen shot below,


Having made the setting changes, I saw that the problem went away. Well, we can see it from the screen shot below,