10-06-2009
This code will work although I'm not a fan of putting passwords in scripts.
ftp -n 10.0.0.1 <<EOF
user USERNAME PASSWORD
ls
EOF
As a minimum, I would suggest storing the password in a hidden file under a hidden directory with strict permissions and using "cat" to read the contents into a variable when using it....
mypass=`cat ${PWD_DIR}/.${USERNAME}.pwd`
The password can still be compromised, but at least they have to work harder to do so.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi there,
My unix box is behind a firewall and I have no access to the firewall, it is currently having time problems so I want to point it at a time server outside of the firewall to keep it's time accurate.
Can anyone think of a way to test connectivity to the time server over port 123 for... (5 Replies)
Discussion started by: Hayez
5 Replies
2. Shell Programming and Scripting
Hi All,
Here i am having a problem in my script....:)
i have one script which will connect from my linux box to antoher linux box..
let say...currently i am in 55.23.621.123
and i want to connect to another box which is 55.23.621.118
as we know we can connect using ssh... (2 Replies)
Discussion started by: Shahul
2 Replies
3. Solaris
If i do a ftp localhost , it works but if i do a ftp x.x.x.x (ip ) it does not work thoug all the services are running what could be the reason for this
bash-3.00# ftp localhost
Connected to localhost.
220-
bash-3.00# ftp 10.63.25.176
Connected to 10.63.25.176.
421 Service not available,... (7 Replies)
Discussion started by: fugitive
7 Replies
4. UNIX for Advanced & Expert Users
Hi All,
can some one please help me to solve this issue, its urgent:confused:
We need to FTP a file form our Unix server to an external client FTP location.
I am trying to connect to the proxy server first and then use the below USER comment to connect to the external FTP server, and its working... (3 Replies)
Discussion started by: JesusJoseph
3 Replies
5. UNIX for Advanced & Expert Users
Hi Guys,
I have trouble connecting to ftp server. My task is to connect to the proxy server and get the latest file to the local machine. It works fine when i do the same steps manually. I've been trying to do it in multiple ways but im just not able to connect. When i check the log, this is what... (4 Replies)
Discussion started by: stunnerz_84
4 Replies
6. UNIX for Dummies Questions & Answers
I have a general problem of connection to my site 'noos'.
My server's ftp name is 'mapage.noos.fr' and login is 'stehub', according to my hotline. I just need to fill the field Password to be connected (in software like Transmit or Dreamweaver), theorically.
BUT IT DOES NOT WORK and my... (7 Replies)
Discussion started by: shub22
7 Replies
7. Shell Programming and Scripting
Hi All,
I have a ftp link as "ftp://ftp1.xyz.org/abc_ike/". The same thing is opening fine when I use a browser. But I am not sure how to connect to the above link from console. I used the command
ftp ftp1.xyz.org
The above is not working. I am not getting any error it simply stands still.... (1 Reply)
Discussion started by: machomaddy
1 Replies
8. Red Hat
We have RHEL 5.8 in our environment, I had a query whether we can implement an FTP server using vsftpd package and Linux configurations like setsebool without using any external FTP clients like FileZilla etc. I am very confused on this. The FTP functionalities that should be present are download &... (3 Replies)
Discussion started by: RHCE
3 Replies
9. Solaris
Hi Everyone,
I am using solaris 10.I am facing a different problem here with tlsftp.I have intalled all steps for tlsftp and able to connect to the destination server from the source server.It worked for some days.But recently when i am connectin it is giving below error.I am... (0 Replies)
Discussion started by: muraliinfy04
0 Replies
10. Shell Programming and Scripting
Hi Friends
I have created a shell script to connect to a windows server. But the problem is while trying to run the script I am not getting any output. After running the script it is hanged and the prompt is not showing until if I press the ctrl+Z to break the script. I also tried using the FTP... (2 Replies)
Discussion started by: Kannannair
2 Replies
LEARN ABOUT MOJAVE
net::server::proto::unix5.18
Net::Server::Proto::UNIX(3) User Contributed Perl Documentation Net::Server::Proto::UNIX(3)
NAME
Net::Server::Proto::UNIX - Net::Server UNIX protocol.
SYNOPSIS
See Net::Server::Proto.
DESCRIPTION
Protocol module for Net::Server. This module implements the UNIX SOCK_STREAM socket type. See Net::Server::Proto.
Any sockets created during startup will be chown'ed to the user and group specified in the starup arguments.
PARAMETERS
The following paramaters may be specified in addition to normal command line parameters for a Net::Server. See Net::Server for more
information on reading arguments.
unix_type
Can be either SOCK_STREAM or SOCK_DGRAM (default is SOCK_STREAM). This can also be passed on the port line (see Net::Server::Proto).
However, this method is deprecated. If you want SOCK_STREAM - just use proto UNIX without any other arguments. If you'd like
SOCK_DGRAM, use the new proto UNIXDGRAM.
METHODS
NS_unix_path/NS_unix_type
In addition to the standard NS_ methods of Net::Server::Proto classes, the UNIX types also have legacy calls to NS_unix_path and
NS_unix_type.
Since version 2.000, NS_unix_path is simply an alias to NS_port. NS_unix_type is now redundant with NS_proto.
These methods were missing between version 2.000 and 2.003 but have been returned as legacy bridges.
QUICK PARAMETER LIST
Key Value Default
# deprecated UNIX socket parameters
unix_type (SOCK_STREAM|SOCK_DGRAM) SOCK_STREAM
port "filename" undef
# more recent usage
port "filename / UNIX"
port "filename / UNIXDGRAM"
LICENCE
Distributed under the same terms as Net::Server
perl v5.18.2 2012-06-06 Net::Server::Proto::UNIX(3)