I have a program running on unix that creates a text file as part of a triggered event. the text files are written to the same directory everytime. There are 15+ users that could possibly be creating the files.
Once the file is created, I need to move the file to a third party system.
the only control/access for this system i have is a username, password and IP address. This server can be accessed by SFTP. I can SFTP the server and provide the password, and execute whatever commands are needed.
question 1 : the user name given to me by the third party is 15 characters long.
and as far as i can see, unix will only allow 8 characters.
when generating the keys (ssh-keygen) on our side, do the names have to match.
question 2: there seems to be a lot of different opinions on what the file permissions for the .ssa directories and files should be on both the host and client. any information in this area would be useful
2. This is a working setup.
Sometimes, have a permission of 600 for authorized_keys may help.
And NO, the username doesn't have to match while generating the ssh-keys.
If you are having trouble setting up the ssh connection, you can run the sshd in foreground with debug enabled. Mostly, that should help if there are any permission related issues.
HTH
--ahamed
Last edited by ahamed101; 04-01-2013 at 08:20 PM..
i think i need to step back and get a better understanding of what is actually happening with the sftp setup
i have setup the following on 2 inhouse unix boxes:
1 client1 will be connecting to target@unix-2, to send files
on client1
created the user client1 (/usr/exec/usrdir/client1) (home)
mkdir .ssh at /usr/exec/usrdir/client1
keygen -t rsa <ENTER> for default directory (home)
<ENTER> <ENTER> at passphrase questions (this will be used from a
shell script to login and send the files to the other machine
on the unix-vm machine:
created the user target (/usr/exec/usrdir/target)
mkdir .ssh
copied the file id_rsa.pub from client1 to /usr/exec/usrdir/target/.ssh on the unix-vm machine
on the unix machine: cat id_rsa.pub >> authorized_keys
from the client1 machine: attempt the command: sftp target@unix-vm
but this still results in being prompted for the password
debug1: next auth method to try is publickey
debug1: try privkey: /usr/exec/usrdir/client1/.ssh/id_rsa
debug3: no such identity: /usr/exec/usrdir/client1/.ssh/id_rsa
debug1: try privkey: /usr/exec/usrdir/client1/.ssh/id_dsa
debug3: no such identity: /usr/exec/usrdir/client1/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: next auth method to try is password
target@unix-2's password:
you mentioned using sshd to debug to find why this is failing. I am starting to play with this but am getting errors about not be able to load the host keys, these particular files under /etc/ssh have not been modified and are the original files from the OS installation, any suggestions......
hi guys,
i need a script to sftp the file from windows to unix server ....(before that i have to check whether the file exists in the windows server or not
and again i have to reverse sftp the files from unix to windows server.....
regards,
Vasa Saikumar. (13 Replies)
Hi Gurus,
We need to make SFTP in non_interactive mode. I have done steps like key generation, copying public key into destination server, changing file/folder permission. Still we are not able to achieve it. Please check the log below....
$ sftp -v b2cint@10.76.120.120
Connecting to... (1 Reply)
Hello all and Happy 2010!
I have following problem and I do not have a full solution yet.
Maybe someone of you could help ....
I have remote sevrer A and I am connecting from my local server via SFTP to download .TXT files.
-Files are dropped at random times into download folder on server A... (7 Replies)
Hello All
I want to list files using SFTP. this should work the same way as
ls -Ap1t $dir is working in a perl program. but for SFTP i dont find any option like as A,p,1,t.so how to use this (0 Replies)
Hi ,
I have a solaris box through which i need to connect to ATM's and pull files using sftp. I did same type of scripting using ftp before but no sftp.The problem now i am facing is, i want to put the password along with this sftp (non-interactive) script. Unfortunately there is no... (3 Replies)
I'm Presently Writting A College Report On Operating Systems, Not Enjoying It Very Much.
I Was Hoping Someone Could Direct Me To A Site Where I Could Get Information Such As The Role Of Operating Systems, Types Of Operating Systems (Multi-User Multi-Tasking etc), Modes Of Operating systems... (3 Replies)