- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- scp automated script
Operating System - HP-UX
1755131
Members
2752
Online
108830
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2009 10:31 PM
10-13-2009 10:31 PM
scp automated script
Hi
I am able to manually scp some files from HP-UX server to a linux server.
If I want to automate that process since those files will be generated on a daily basis, I would like to know what is the best way to write.
Currently, the manual way is as follows :
scp filenames idname@hostname:/home/idname
after key in the password, the files are transferred over.
Thanks a lot.
Feng Lin
I am able to manually scp some files from HP-UX server to a linux server.
If I want to automate that process since those files will be generated on a daily basis, I would like to know what is the best way to write.
Currently, the manual way is as follows :
scp filenames idname@hostname:/home/idname
after key in the password, the files are transferred over.
Thanks a lot.
Feng Lin
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2009 11:38 PM
10-13-2009 11:38 PM
Re: scp automated script
Hi,
Here is the step how to configure ssh without passwd
Using the below steps, you can ssh to the server from client without the entering any password.
The machine which run the ssh command is the client
The machine that the client access using ssh is the server
Run the following command on the client
-> ssh-keygen -t dsa
File id_dsa and id_dsa.pub will be created inside $HOME/.ssh
Copy id_dsa.pub to the server's .ssh directory
-> scp $HOME/.ssh/id_dsa.pub user@server:/home/user/.ssh
Change to /root/.ssh and create file authorized_keys containing id_dsa content
-> cd /home/user/.ssh
-> cat id_dsa >> authorized_keys
You can try ssh to the server from the client and no password will be needed
-> ssh user@server
Another alternative to the above steps is to use ssh-copy-id command. The steps are:
Run the following command on the client
-> ssh-keygen -t dsa
File id_dsa and id_dsa.pub will be created inside $HOME/.ssh
Copy the id_dsa.pub to the server's .ssh directory
-> ssh-copy-id -i ~/.ssh/id_dsa.pub user@server
You can try ssh to the server from the client and no password will be needed
-> ssh user@server
Once your ssh without passwd is configured then you can run your scp script it will work
Suraj
Here is the step how to configure ssh without passwd
Using the below steps, you can ssh to the server from client without the entering any password.
The machine which run the ssh command is the client
The machine that the client access using ssh is the server
Run the following command on the client
-> ssh-keygen -t dsa
File id_dsa and id_dsa.pub will be created inside $HOME/.ssh
Copy id_dsa.pub to the server's .ssh directory
-> scp $HOME/.ssh/id_dsa.pub user@server:/home/user/.ssh
Change to /root/.ssh and create file authorized_keys containing id_dsa content
-> cd /home/user/.ssh
-> cat id_dsa >> authorized_keys
You can try ssh to the server from the client and no password will be needed
-> ssh user@server
Another alternative to the above steps is to use ssh-copy-id command. The steps are:
Run the following command on the client
-> ssh-keygen -t dsa
File id_dsa and id_dsa.pub will be created inside $HOME/.ssh
Copy the id_dsa.pub to the server's .ssh directory
-> ssh-copy-id -i ~/.ssh/id_dsa.pub user@server
You can try ssh to the server from the client and no password will be needed
-> ssh user@server
Once your ssh without passwd is configured then you can run your scp script it will work
Suraj
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP