how it works ? sftp


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how it works ? sftp
# 1  
Old 06-11-2009
how it works ? sftp

Hi,

I am curious about this script , how it is running ..?

#!/bin/sh
echo "OK, starting now..."
ftp remotehost <<EOF

When I run , it is asking
OK, starting now...
Password:Name (remotehost):

SHould I enter only password ?

and explain me how it works..

thanks in advance..
# 2  
Old 06-11-2009
Your title says "sftp" but your script shows that you are using ftp. Which is it?
# 3  
Old 06-11-2009
ftp is an unencrypted transfer. You may need to provide a password if you are accessing a protected directory. Anonomous ftp works by just being lax in the authentication. You enter anonomous as the account an email address as the password. Few systems even validate the email for form, less accuracy.

sFTP is an encrypted transfer. You may use a password to authenticate to a host. (or you can use a digital certificate).
# 4  
Old 06-12-2009
okay,thanks,,

I need to transfer some of the log files from one host to another, while transfering it should not ask any password,so is it possible to do ?/ ?

thanks in advance..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SSh works but sftp doesn't for all users except root

I am sorry if i post in wrong Form. i have AIX server in which ssh works for all users but sftp only works for root user . it is too much important for me to solve this . Your help will be greatly appreciated. (1 Reply)
Discussion started by: khalid khanAIB
1 Replies

2. Shell Programming and Scripting

Sftp : not able to print the echo statements after the sftp transfer

I had the below sftp script working perfectly but the problem is I am not able to send the echo statements . #!/bin/sh echo "Starting to sftp..." sftp admin@myip << END_SCRIPT cd /remotepath/ lcd /localpath/ mget myfiles*.csv bye END_SCRIPT echo "Sftp successfully." echo echo... (11 Replies)
Discussion started by: scriptscript
11 Replies

3. Red Hat

Chroot sftp users, remote sftp login shows wrong timestamp on files

Hello, I have a weird issue, I have RHEL 5.7 running with openssh5.2 where sftpgroup OS group is chroot. I see the difference difference in timestamp on files, when I login via ssh and SFTP, I see four hour difference, is something missing in my configuration. #pwd... (8 Replies)
Discussion started by: bobby320
8 Replies

4. Programming

SFTP fails from crontab but works from terminal

Dear community, I'm driving crazy with a strange issue. I have a simple script to transfer a file to a remote system:#!/bin/bash echo "put /tmp/server.log" > /tmp/server1_transfer.sftp sftp -b /tmp/server1_transfer.sftp user@10.99.1.2:Between client and server there is a SSH KEY, so if I run... (15 Replies)
Discussion started by: Lord Spectre
15 Replies

5. Cybersecurity

SFTP passwordless (kind of works)

Hi, I set up the keys on local and remote server. If I simply do: sftp xxx.xxx.xxx.xxx It works without asking for a password. But if I change the command to: sftp user@server it prompts me for password. Anybody know how to rectify this? Thanks a bunch. EDIT: I copied the key... (3 Replies)
Discussion started by: tetra
3 Replies

6. Shell Programming and Scripting

SFTP-how to log individual sftp command error while executing shell script

Hi, I have situation where i need to automate transferring 10000+ files using sftp. while read line do if ; then echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt fi done< files.txt sftp -b sftpCommand.txt stu@192.168.2.1 The above... (1 Reply)
Discussion started by: noobrobot
1 Replies

7. UNIX for Dummies Questions & Answers

Need a visual grep tool that works on windows via sftp

Hi, Could you please suggest a tool that connects like WINSCP/Putty and allows me to search a remote Unix directory for a certain text pattern (grep) ? Regards, Bhanja. (1 Reply)
Discussion started by: bhanja_trinanja
1 Replies

8. UNIX for Advanced & Expert Users

How this works?

I have a program............ #include<stdio.h> #include<unistd.h> main() { if(fork == 0) { printf("Hi every body:p!!!!!!!!!!"); } } This program works with out any error. here fork is not a system call. It just act as a variable.But how it works without declaring it? What data type it... (19 Replies)
Discussion started by: carolsanjeevi
19 Replies

9. UNIX for Advanced & Expert Users

sftp only works for root

Hi all, I have an aix 5.3 running open ssh 1.75 i think only root can sftp into the server. I appears to authenticate OK via the verbose output. Here it is: ################################################ ################################################ ... (3 Replies)
Discussion started by: dfezz1
3 Replies

10. AIX

SFTP Failed---Request for subsystem 'sftp' failed on channel 0

Hi, While I am trying SFTP my machine to another unix machine , it was working fine till 10 min back. But now i am getting the below error "Request for subsystem 'sftp' failed on channel 0" Could you please someone help me to solve or analyise the root cause... Cheers:b:, Mahiban (0 Replies)
Discussion started by: mahiban
0 Replies
Login or Register to Ask a Question