I need some help on writing a script that is able to remote copy file to one server. I already created this types of scripts, and works ok as long as this server I want to copy from is access through telnet. Here is how I do it:
So you see that the input << allows the user name and password to be prompt.
The problem is when I try to do the same with the other servers that can be accessed only through ssh protocol. I tried to do this:
where my batfile contains:
But still when I run the script it prompts for the password, and (after i enter the password) it says that there is no such file in such path....
I already sniffed around the net, and I already comprehend that sftp is mainly interactive, that the best way is to do it in a script is through scp with using a public/private key. But my problem is:
With scp, instead of remote cp to the server where the script is runing, I have to write a script in the server I want to copy from
I really rather not create a public/private key as root, but the files are accessible as root.
But right now, I´m open to suggestions, and in case there is no way to do this withouth the creation of a key, can you guys show me how to create this keys, and how it works??
There is still a lot of thing to learn in unix...... a lot!
Thanks for your time and help.
---------- Post updated at 05:29 PM ---------- Previous update was at 03:26 PM ----------
Hey guys, a little help please?? Kind of desperate here...
Thanks a lot
Hello all,
I have a bit of trouble working a passwordless SSH from UNIX to Cygwin running windows 2k3. Here are some details. I AM able to SSH from the Windows box to the UNIX box using the keys. Also, I'm able to SSH from UNIX to Windows w/o the keys. However, when I try to do it with the keys... (9 Replies)
Hi everyone,
I have a quick/newb question:
I know that a public key is used to encrypt data and a private key is used to decrypt data but who keeps the public/private keys??
Does the Web Server hold both?
Does the Web Server have the public key and does the client have the private key? ... (3 Replies)
Hi,
please guide me create a public/private key using ssh-keygen, lets say I have been access to server named pngpcdb1with a userid and password ...!!! and also please explain in detail the concept of these keys and ssh as I was planning to use them in ftp related scripts..! Thanks in... (1 Reply)
Hi all,
I needed a shell script for file transfering using public/private keys for authentication.
Could you please help me out on this?
A procedure to write a shell script is enough.
Thanks in advance.
Regards.
Vidya N (8 Replies)
Hi All,
I have a query....say on server A, I have generated the Private and Public keys and shared the public key with server B.
Now i can surelyconnect(without password) from server A to server B.....
but can i similarly connect from server B to server A as well
Regards (1 Reply)
hi guys , i have few files i have to do sftp, the public and private key work like a magic , no problem at all
the syntax is as below
sftp -0 identityfile=~/ure/blsl/loc2/.ssh/id_rsa_ssh1 ssh1@remote >log_dir/file.timestamp<<end
lcd folder
cd folder
put *
quit
end
================
my... (3 Replies)
Hi i am using solaris 10.I am trying to setup a public/private key but it is not working.Appreciate your repsonse on it
There are two servers DB1 server and DB2 server.
1)I have generated public/private key using below step on both servers.
ssh-keygen -t rsa
2)From DB1 server moved the... (6 Replies)
Hi,
What tool is used to generate public and private keys for SCP?
Do you have an example script that generates these keys, puts them in files and then another example script that references them from SCP?
Thanks, (9 Replies)
Hi All,
I have a requirement where i need to check if an rsa public key corresponds to a private key and hence return success or failure. Currently i am using the command
diff <( ssh-keygen -y -e -f "$PRIVKEY" ) <( ssh-keygen -y -e -f "$PUBLICKEY" )
and its solving my purpose. This is in... (1 Reply)
Hi,
we have private and public key, encrypt file using public and want to decrypt using private key. can you please advise below commands are correct or other remedy if unix have?
encrypt -a arcfour -k publickey.asc -i TESTFILE.csv -o TESTFILE00.csv
decrypt -a arcfour -k privatekey.asc... (2 Replies)
Discussion started by: rizwan.shaukat
2 Replies
LEARN ABOUT CENTOS
pppoe-setup
PPPOE-SETUP(8) System Manager's Manual PPPOE-SETUP(8)NAME
pppoe-setup - Shell script to configure Roaring Penguin PPPoE client
SYNOPSIS
pppoe-setup
DESCRIPTION
pppoe-setup is a shell script which prompts you for various pieces of information and sets up an /etc/sysconfig/network-scripts/ifcfg-ppp0
configuration script for the pppoe-start, pppoe-stop and +pppoe-connect scripts.
AUTHOR
pppoe-setup was written by David F. Skoll <dfs@roaringpenguin.com>.
The pppoe home page is http://www.roaringpenguin.com/pppoe/.
SEE ALSO pppoe(8), pppoe-start(8), pppoe-stop(8), pppoe-connect(8), pppd(8), pppoe.conf(5), pppoe-status(8), pppoe-sniff(8), pppoe-relay(8), pppoe-
server(8)4th Berkeley Distribution 21 February 2000 PPPOE-SETUP(8)