Connecting to other server thru ftp


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Connecting to other server thru ftp
# 1  
Old 10-06-2009
Tools Connecting to other server thru ftp

Hi,

Can someone help me on how to ftp to UNIX server from an another UNIX Server.

I tried the follwoing but it is not working.

Code:
 ftp -n 10.10.0.1
quote user usrname
quote pass passwd
ls

Though ftp is starting it is not allowing me run command.....
it is asking to
Quote:
Please login with USER and PASS
Please login with USER and PASS
Thanks in advance.......
# 2  
Old 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.
# 3  
Old 10-06-2009
jsmithstl,

It is working....

Thank you very much for your solution and a valuable suggestion.....

I'll definitely work on it.... Thanks

---------- Post updated at 10:26 PM ---------- Previous update was at 09:53 PM ----------

Hi,

I tried ssh with the following command line....
Code:
 ssh -l usrname 10.10.0.1

It has given the following error....
Quote:
Permission denied, please try again.
The password and the username provided are correct.. but getting this error...

Any help please.....
# 4  
Old 10-06-2009
Is ssh enabled on the servers involved? if so you can do this:

ssh myuser@remote_server [optional command]
# 5  
Old 10-06-2009
Thank you very much...

This is working well......
# 6  
Old 10-06-2009
Can you log into the ssh server from the console?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Connecting to a server using FTP is hanging

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

2. Solaris

Ftp: SSL_connect error while connecting from source to destination server Solaris 10

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

3. Red Hat

Implement FTP server on RHEL server without using FTP client

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

4. Shell Programming and Scripting

Issue with Connecting to ftp server

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

5. UNIX for Dummies Questions & Answers

Connecting through ftp command

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

6. UNIX for Advanced & Expert Users

Trouble connecting to FTP proxy server

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

7. UNIX for Advanced & Expert Users

Unix FTP Script connecting through proxy Not working

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

8. Solaris

Ftp not connecting to ip

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

9. Shell Programming and Scripting

Connecting other server using ssh!

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

10. UNIX for Dummies Questions & Answers

Connecting to time server

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
Login or Register to Ask a Question