ftp:Password field is displayed


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ftp:Password field is displayed
# 1  
Old 03-01-2011
ftp:Password field is displayed

I am trying to get a file by doing ftp to the server.
The below script works fine but as I type password it is displayed as simple text.

Code:
HOST='192.108.245.101'
echo 'username: '
read USER
echo 'password:'
read PASSWD
ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
lcd
cd /home/seo/hitendra
get tttt.sh
prompt off
quit
END_SCRIPT
exit 0


I want that password is displayed as * or blank so that password is not revealed to others.

When run
Code:
/home/seo/hitendra/
$ unix_10.sh
username: 
hitenc
password:
unix_unix007
Local directory now /home/seo/hitendra/
Interactive mode off.

I want to enter the username in the same line not like the above where after displaying the text username the control comes to the new line.Smilie

Also It does not display the messages of ftp like command succesfull and others.
# 2  
Old 03-01-2011
Go through this link, it should be helpful to you..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed : Second field not getting displayed in the output

Hi , I have a file (input.txt) with the below contents : 20150223T12:00:25 hostnamex 20150716T10:40:54 hostnamey 20150202T20:08:03 hostnamez I want the output to be like below i.e excluding the timestamp ( THH:MM:SS) in the above file as follows : 20150223 hostnamex 20150716... (2 Replies)
Discussion started by: rahul2662
2 Replies

2. UNIX for Dummies Questions & Answers

Get ftp without password

Dear Masters, I usually run bash to get file from ftp using command below (user : nobody, password : guest) #!/bin/bash cd /xx/xy/prog FILE="list_country.xls" /usr/bin/ftp -in 1.2.116.12 << END user nobody guest ascii cd /XYZ/ABC binary get $FILE quit END But in this case,... (9 Replies)
Discussion started by: radius
9 Replies

3. Shell Programming and Scripting

Script to bypass the password field

Hello all Im trying to write a script that can get past the "enter password" field.Coming to the details, Im planning to write a script that can actually check for the validity of certificates in websphere. There is a utility "keytool" that helps provide this information.However if we want to... (4 Replies)
Discussion started by: coolkid
4 Replies

4. Shell Programming and Scripting

password getting displayed using sudo

Hi While doing the following command password is gettin dispalyed : ssh <host> "sudo command ; exit" .... while i type my password for 2nd its gettin displayed ... i tried stty -echo and stty echo ... still i am havin problem..:confused: (1 Reply)
Discussion started by: ningy
1 Replies

5. UNIX for Dummies Questions & Answers

character displayed incorrectly by ftp

Hi there, I have a ftp server called atlantis. Because of the f...g french characters, I noticed something very weird. Depending on what program I use (ftp, lftp or ssh) the same character is displayed as three different ways. On my local computer, the file is correctly displayed as "modéles".... (1 Reply)
Discussion started by: chebarbudo
1 Replies

6. Shell Programming and Scripting

How to hide password from getting displayed on screen

I am writting script like echo "ENTER USERNAME: \c " read uName echo "ENTER PASSWORD: \c" read pwd In this it is shwng password on screen, I want to hide it, how can I do that (5 Replies)
Discussion started by: scorp_rahul23
5 Replies

7. Shell Programming and Scripting

Password is getting displayed

My shell script which runs on solaris has an execution in it. Contents of shell script BEGIN : Executable_filename username/password@DBinstance parameter2 parameter3 Contents of shell script END : When i launch the shell script, it connects to database to gets few details.. In the... (3 Replies)
Discussion started by: shafi2all
3 Replies

8. UNIX for Dummies Questions & Answers

Replace password field using ed/sed

I need to edit the password file to change the password field to *LK* for a specified account (abctest) like: abctest:*LK*:135:20::/home/abctest:/sbin/sh Can anyone help me do this using ed or sed? Thanks a lot! (6 Replies)
Discussion started by: munch
6 Replies

9. Shell Programming and Scripting

Is there a way to automatically prepopulate a password field?

I want to know if there is a way that I can right a script that will su to root and prepopulate the password field? (6 Replies)
Discussion started by: chrchcol
6 Replies

10. UNIX for Dummies Questions & Answers

ftp password issue

I think I may have put this in the wrong forum earlier the script that follows is an extract from a post someone gave as an answer to a question on ftp within a script /usr/bin/ftp ftpsiteaddress <<END verbose on bin user username password cd <directoryname> put <filename> mput... (3 Replies)
Discussion started by: Henrik
3 Replies
Login or Register to Ask a Question