Why PieTTY echo login password as "*"?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Why PieTTY echo login password as "*"?
# 1  
Old 08-06-2011
Why PieTTY echo login password as "*"?

Normally, When we login a remote server, the password does'nt echo as anything. But When I use PieTTY(on windows) to login a linux ssh server, the password echoes as "*". But When I have logged in, I use the ssh command to login the same server locally again, now the password does'nt echo.

I know we can use tcsetattr() and set the terminal to NO ECHO in a programme when we need a password. But in the case above, it is a bit confusing. Any idea?

PS: PieTTY is a fork of PuTTY. But PuTTY does'nt echo passord in any condition.

Code:
login as: admin
password: ********                //echo "*" here
[admin@Archlinux~] ssh 127.0.0.1
password:                         //echo nothing here
[admin@Archlinux~] exit
Connection to 127.0.0.1 closed.
[admin@Archlinux~]


Last edited by vistastar; 08-06-2011 at 03:39 AM..
# 2  
Old 08-06-2011
I assume you are connecting through Windows. So during your first login, prompt is of windows which generally displays the passwords in * from.
Once you are logged into UNIX (archlinux), stty settgins are set, so that they dont display password while you type them
# 3  
Old 08-06-2011
I'd say it's a setting of PieTTY, since the output during the connection phase is completely controlled by the client. There's no server or console setting that would influence that.
# 4  
Old 08-07-2011
@ a20786

Why stty settings are set after login? When we are logining, we are in a terminal already.

@ pludi
I am sure that the sshd has control to the terminal to decide if the password should be echoed. There's no option in the PieTTY setting panel about this. I assume the windows ssh client PieTTY negociates with sshd to display a "*". When logged in, the linux ssh client negociates with sshd to display nothing. But I'm not sure.
PS: Since PieTTY surpports telnet too, I tried to telnet to the server, It does'nt display password as "*".

Last edited by vistastar; 08-07-2011 at 01:32 AM..
# 5  
Old 08-07-2011
I skimmed through the Authentication RFC (RFC 4252) again, and didn't see anything about negotiation of password echoing.

Also, there's a big difference between SSH and Telnet: as soon as you connect to a telnet server, it controls the connection and all output. So if the telnet server decided that you should see asterisks when entering the password, you will see them. If it decides you should see percent signs instead, you'll see those.

And no, when you're still authenticating in SSH, you don't have a terminal yet. You're connected to the SSH server, which usually runs as a daemon, and doesn't have a TTY associated. Only after successful authentication the connection is assigned a TTY (if the client requests one).
# 6  
Old 08-07-2011
Quote:
I skimmed through the Authentication RFC (RFC 4252) again, and didn't see anything about negotiation of password echoing.

Also, there's a big difference between SSH and Telnet: as soon as you connect to a telnet server, it controls the connection and all output. So if the telnet server decided that you should see asterisks when entering the password, you will see them. If it decides you should see percent signs instead, you'll see those.

And no, when you're still authenticating in SSH, you don't have a terminal yet. You're connected to the SSH server, which usually runs as a daemon, and doesn't have a TTY associated. Only after successful authentication the connection is assigned a TTY (if the client requests one).
Agree with you. I read APUE in chapters about the terminal, It is really complex about TTY.
In experiments I find telnetd involks 'login' and assigns TTY to it, but sshd verifies passwords itself with no TTY.
But since I can communicate with sshd without a TTY, what does a TTY really do? What is the relationship between ssh client and the terminal emulator?
# 7  
Old 08-07-2011
A TTY is basically a software emulated computer terminal. In the olde days it was common that multiple terminals were connected to a mainframe using serial cabling (it's from that time that there's a distinction between the Return key and the Enter key). A daemon doesn't need a terminal to work, since it doesn't do any direct interaction with the user. Other programs however do need it, as the TTY provides the input and output channels that the user interacts with.
This User Gave Thanks to pludi For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

tcsh - understanding difference between "echo string" and "echo string > /dev/stdout"

I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here. I have following script (called out_to_streams.csh): #!/bin/tcsh -f echo Redirected to STDOUT > /dev/stdout echo Redirected to... (2 Replies)
Discussion started by: marcink
2 Replies

2. AIX

echo $varibla | mail -s "subject" "xxx@xxx.com" not ruuning as expected

Hi Folks, As per the subject, the following command is not working as expected. echo $variable | mail -s "subject" "xxx@xxx.com" Could anyone figure it out whats wrong with this. I am using AIX box. Regards, (2 Replies)
Discussion started by: gjarms
2 Replies

3. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

4. Shell Programming and Scripting

ksh script that echo " please insert your name " and store the output to a login.log file.

Hello All Nice to meet you all here in this forum, it's my 1rst time here i'm asking about a little issue that i face i added a ksh script that echo " please insert your name " and store the output to a login.log file. the script is working fine with normal telnet but Xstart is not working... (8 Replies)
Discussion started by: islam.said
8 Replies

5. UNIX for Dummies Questions & Answers

how to install "source" command!/ broken "login.cl"!

Hello, I am new to this forums and this is my first "asking help" message! i have 2 problems: 1- for unknown reasons the "source" command is not avalable in my system (UBUNTU). i can't either see it in my bin directory! 2- again for unknown reasons the "login.cl" file in the home... (0 Replies)
Discussion started by: astrosona
0 Replies

6. Shell Programming and Scripting

Difference between using "echo" builtin and /bin/echo

So in my shell i execute: { while true; do echo string; sleep 1; done } | read line This waits one second and returns. But { while true; do /bin/echo string; sleep 1; done } | read line continues to run, and doesn't stop until i kill it explicitly. I have tried this in bash as well as zsh,... (2 Replies)
Discussion started by: ulidtko
2 Replies

7. Shell Programming and Scripting

"sed" to check file size & echo " " to destination file

Hi, I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
Discussion started by: jockey007
7 Replies

8. Shell Programming and Scripting

script that can give login password for "ssh" without involving STDIN

Hi Folks, I am writing a shell script that can logon to remote machine automatically. But, I am facing one problem. I am using "ssh" command in script and while login into remote machine it asks for passowrd and it stops for STDIN input for password. I want my script to supply password... (2 Replies)
Discussion started by: gydave
2 Replies

9. UNIX for Dummies Questions & Answers

No utpmx entry: you must exec "login" from lowest level "shell"

Hi I have installed solaris 10 on an intel machine. Logged in as root. In CDE, i open terminal session, type login alex (normal user account) and password and i get this message No utpmx entry: you must exec "login" from lowest level "shell" :confused: What i want is: open various... (0 Replies)
Discussion started by: peterpan
0 Replies
Login or Register to Ask a Question