- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Supplying password and user name to scp command
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО03-04-2008 04:19 AM
тАО03-04-2008 04:19 AM
Supplying password and user name to scp command
Hi all,
Can any one tell me how to copy a file in a remote machine through any script.Provided the username and password are given with the following command:
scp root@15.02.5.5:/home/jaguar/file.txt /home/have
Please explain how to supply the password in the script.Thanks in advance
- Tags:
- scp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2008 04:51 AM
тАО03-04-2008 04:51 AM
Re: Supplying password and user name to scp command
- Use public key authentication
- Use expect script
Recommendation:
Disable root access for SSH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2008 09:27 PM
тАО03-04-2008 09:27 PM
Re: Supplying password and user name to scp command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2008 01:04 AM
тАО03-05-2008 01:04 AM
Re: Supplying password and user name to scp command
Copy the "id_[r|d]sa.pub" (public key) of each of the systems to the other and then add/append them to the "~/.ssh/authorized_keys". Make sure that the key is one continuous line and does not contain
Also ensure that the permissions are correctly set on the ".ssh 0700", "id_rsa 0600", "id_rsa.pub 0644".
To test try SSH and SCP as this user in both directions. if there is a problem run "ssh -v" to see the debug output.
Good luck,
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2008 03:00 AM
тАО03-05-2008 03:00 AM
Re: Supplying password and user name to scp command
ssh-key-gen -t dsa
copy the id_dsa.pub file to the target system and append it to the $HOME/.ssh/authorized_keys file
Make sure the owner of the home and .ssh directories is consistent with the user that lives there.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com