automatic sftp


 
Thread Tools Search this Thread
Operating Systems Solaris automatic sftp
# 1  
Old 06-15-2005
automatic sftp

I have tried the below method on solaris 9 running ssh -V
SSH Version Sun_SSH_1.0, protocol versions 1.5/2.0.

http://acd.ucar.edu/~fredrick/mpark/ssh/rsa-unix.html

It still prompts me for password, not sure why, I have followed the directions to a teeth. Any suggestions?
# 2  
Old 06-15-2005
what are the permissions on the .ssh directory and all files contained therein?
# 3  
Old 06-15-2005
ls -l -a
drwxr-xr-x 2 oracle dba 512 Jun 15 15:24 .ssh


ls -l .ssh
total 6
-rw-r--r-- 1 oracle dba 224 Jun 15 15:24 authorized_keys
-rw------- 1 oracle dba 951 Jun 15 15:19 id_rsa
-rw-r--r-- 1 oracle dba 224 Jun 15 15:19 id_rsa.pub
# 4  
Old 06-15-2005
Change the .ssh directory permissions to 700 and try again. If that doesnt work, post the .ssh directory permissions and contents of the target server.
# 5  
Old 06-15-2005
drwx------ 2 oracle dba 512 Jun 15 15:26 .ssh


ls -l
total 8
-rw-r--r-- 1 oracle dba 224 Jun 15 16:10 authorized_keys
-rw------- 1 oracle dba 963 Jun 15 15:21 id_rsa
-rw-r--r-- 1 oracle dba 448 Jun 15 15:21 id_rsa.pub
-rw-r--r-- 1 oracle dba 466 Jun 15 15:26 known_hosts
# 6  
Old 06-15-2005
Ok. do an ssh -vv.

That will tell you what the problem is. You may have to change the permissions on the files in .ssh to 600.
# 7  
Old 06-15-2005
Quote:
Originally Posted by dangral
Ok. do an ssh -vv.

That will tell you what the problem is. You may have to change the permissions on the files in .ssh to 600.
ssh -vv
Usage: ssh [options] host [command]
Options:
-l user Log in using this user name.
-n Redirect input from /dev/null.
-A Enable authentication agent forwarding.
-a Disable authentication agent forwarding.
-X Enable X11 connection forwarding.
-x Disable X11 connection forwarding.
-i file Identity for RSA authentication(default: ~/.ssh/identity).
-t Allocate a tty even if a command is given.
-T Do not allocate a tty.
-v Verbose; display verbose debugging messages.
Multiple -v increases verbosity.
-V Display version number only.
-P Don't allocate a privileged port.
-q Quiet: don't display warning messages.
-f Fork into background after authentication.
-e char Set escape character; ``none'' = disable(default: ~).
-c cipher Select encryption algorithm: ``3des'', ``blowfish''
-m macs Specify MAC algorithms for protocol version 2.
-p port Connect to this port. Server must be on the same port.
-L listen-port:hostSmilieort Forward local port to remote address
-R listen-port:hostSmilieort Forward remote port to local address
These cause ssh to listen for connections on a port, and
forward them to the other side by connecting to hostSmilieort.
-C Enable compression.
-N Do not execute a shell or command.
-g Allow remote hosts to connect to forwarded ports.
-4 Use IPv4 only.
-6 Use IPv6 only.
-2 Force protocol version 2.
-o 'option' Process the option as if it was read from a configuration file.
-s Invoke command (mandatory) as SSHv2 subsystem.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. Shell Programming and Scripting

automatic SFTP without doing passwordless key with ssh-keygen

I need to automate a file transfer thru SFTP. But I cannot do a passwordless key with ssh-keygen between the servers. Is there any other way like we do something like below in FTP??? ftp -n hostIP << EOF user userid password get filename EOF Please use code tags! (5 Replies)
Discussion started by: Vidhyaprakash
5 Replies

4. Programming

Automatic SFTP transfers using OpenSSH on Windows and C#

I would like to create console application in c# to automate the process of downloading some files from a SFTP server to my local hard drive at a set time each week/day. SFTP Server installed OpenSSH for windows and client machine also. Any ideas how I could do such a task? or sample code. ... (0 Replies)
Discussion started by: sufiiyan
0 Replies

5. 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

6. Shell Programming and Scripting

Regarding automatic keystroke

Hi All , I am writing a shell script for a 3D test case . The 3D Test case involves the user to press some keys to see the changes in the 3d test case . The user has to press p , r , a , z etc to observe the changes on screen . Now please let me know how can i implement the keystroke p , a ,... (1 Reply)
Discussion started by: dskonnur
1 Replies

7. Shell Programming and Scripting

Automatic FTP

Hi I am looking for automatic FTP script from UNIX to UNIX servers. I have two problems that anyone may help: 1- The directory where the files have to be FTPed is varied, where it is identified by the date of today (YYYYMMDD) 2- the files come every 15 minutes and named by the time with form... (2 Replies)
Discussion started by: akhadoor
2 Replies

8. Shell Programming and Scripting

Automatic sftp

Hi, Is there a way to automatically SFTP like automatic FTP option used below ftp -nv hostname << DONE user username password get file quit DONE If yes please let me know the script. :rolleyes: Thanks, Dayanand. (1 Reply)
Discussion started by: dayanand
1 Replies

9. UNIX for Dummies Questions & Answers

Why not automatic bootup

Evry time I start up my mavhine ,have to type in unix at Boot : Is there a way unix should bootup automatically? Asif (2 Replies)
Discussion started by: asif iqbal
2 Replies

10. Shell Programming and Scripting

automatic su

Hi all, Suppose I have a script under user A, which calls a script under user B (this script should be run using user B). How can I change the user (along with supplying the password) automatically in the script (a command similar to su)? Thank you in advance Best Regards (1 Reply)
Discussion started by: omran
1 Replies
Login or Register to Ask a Question