- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: scp from local to other hosts
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
Forums
Discussions
Discussions
Discussions
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
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
12-20-2004 08:54 AM
12-20-2004 08:54 AM
scp from local to other hosts
I have got a Linux host. I am having some file which I need to remote host to destination location.
scp $file pzanwar@host:/etc/mail/aliases
says permission denied.
What I tried doing is sent the file to my home directory and then ssh sudo cp -p ~pzanwar/
This says destination shud be directory..
I want to know y scp is failing first. and how do i acheive this. same happens with mv also.
password gets through..though
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2004 09:01 AM
12-20-2004 09:01 AM
Re: scp from local to other hosts
try this as,
scp $file root@host:/etc/mail/aliases
hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2004 09:40 AM
12-20-2004 09:40 AM
Re: scp from local to other hosts
Thanks
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2004 08:07 PM
12-20-2004 08:07 PM
Re: scp from local to other hosts
I suppose both can use the pluggable authentication modules (PAM).
But this is a matter of how the tools were compiled and how they are configured.
At least from the OpenSSH sshd_config I know that there exists a directive UsePAM, and that the by HP distributed "Secure Shell" for HP-UX (which is a build from OpenSSH) has PAM support enabled and comes with sshd.pam.* libs.
Is your root access on the remote host fully restricted by sudo, or do you have a chance to place files in root's home dir?
If the latter is true you can either create a ~root/.shosts file (not the preferred method), or create a key pair of your local account and append it to ~root/.ssh/authorized_keys on remote host.
But you have to know how the remote sshd is configured, i.e. be able to look at its sshd_config to see what is allowed.
There are too many directives that rule the behaviour of the remote sshd for me to spell them all out here.
If you were able (and willing, caveat security policy) to post the contents of the sshd_config of remote host here we could advise you what would work, and probably what would be advisable as Dos and Don'ts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2004 02:57 AM
12-21-2004 02:57 AM
Re: scp from local to other hosts
Suggestion is good though. Thanks a lot.
I will probably take help of security guys to make this work.
Thanks a lot.
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2004 03:03 AM
12-21-2004 03:03 AM
Re: scp from local to other hosts
ssh sudo cp -p ~pzanwar/
You need to as follows. (As a pzanwar user)
sudo scp $file root@host:/etc/mail/aliases
I assume that you have set root user for authentication.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2004 03:52 PM
12-21-2004 03:52 PM
Re: scp from local to other hosts
Try the following,
cat $file | ssh RemoteMachine 'cat >> /etc/mail/aliases'
Permisson Denied problem may arise,due to
1. Your account may expired in remote machine.
2. You may not have nescessary privileges
to create a file in remote machine.
Try the following,
1. Run scp in debug mode as follows
scp -v $file username@remotehost:/dest/dir
It can figure out possible causes of problems.
2. If possible run the server in debug mode to find the fault.
Hope this helps.
--
M