Why does scp seem to be failing?
The copy seems to be failing. I was actually trying to copy a large directory and assumed it was failing because of the size, so I made a simple example with a small file, to demonstrate.
hduser@hnode0:~ $ ls -la myfile
-rw-r--r-- 1 hduser hdgroup 0 Aug 7 09:42 myfile
hduser@hnode0:~ $ scp myfile hduser@hnode2
hduser@hnode0:~ $ ssh hnode2
hduser@hnode2:~ $ ls -la myfile
ls: cannot access 'myfile': No such file or directory
hduser@hnode2:~ $ sudo find / -iname myfile
[sudo] password for hduser:
hduser@hnode2:~ $
Does scp write to a log ?
debian ssh raspbian scp
add a comment |
The copy seems to be failing. I was actually trying to copy a large directory and assumed it was failing because of the size, so I made a simple example with a small file, to demonstrate.
hduser@hnode0:~ $ ls -la myfile
-rw-r--r-- 1 hduser hdgroup 0 Aug 7 09:42 myfile
hduser@hnode0:~ $ scp myfile hduser@hnode2
hduser@hnode0:~ $ ssh hnode2
hduser@hnode2:~ $ ls -la myfile
ls: cannot access 'myfile': No such file or directory
hduser@hnode2:~ $ sudo find / -iname myfile
[sudo] password for hduser:
hduser@hnode2:~ $
Does scp write to a log ?
debian ssh raspbian scp
add a comment |
The copy seems to be failing. I was actually trying to copy a large directory and assumed it was failing because of the size, so I made a simple example with a small file, to demonstrate.
hduser@hnode0:~ $ ls -la myfile
-rw-r--r-- 1 hduser hdgroup 0 Aug 7 09:42 myfile
hduser@hnode0:~ $ scp myfile hduser@hnode2
hduser@hnode0:~ $ ssh hnode2
hduser@hnode2:~ $ ls -la myfile
ls: cannot access 'myfile': No such file or directory
hduser@hnode2:~ $ sudo find / -iname myfile
[sudo] password for hduser:
hduser@hnode2:~ $
Does scp write to a log ?
debian ssh raspbian scp
The copy seems to be failing. I was actually trying to copy a large directory and assumed it was failing because of the size, so I made a simple example with a small file, to demonstrate.
hduser@hnode0:~ $ ls -la myfile
-rw-r--r-- 1 hduser hdgroup 0 Aug 7 09:42 myfile
hduser@hnode0:~ $ scp myfile hduser@hnode2
hduser@hnode0:~ $ ssh hnode2
hduser@hnode2:~ $ ls -la myfile
ls: cannot access 'myfile': No such file or directory
hduser@hnode2:~ $ sudo find / -iname myfile
[sudo] password for hduser:
hduser@hnode2:~ $
Does scp write to a log ?
debian ssh raspbian scp
debian ssh raspbian scp
edited Jan 30 at 20:56
Rui F Ribeiro
40.1k1479135
40.1k1479135
asked Aug 7 '18 at 9:57
Joe KingJoe King
1133
1133
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The scp
is not failing, but it isn't doing what you expect it to do.
With
scp file user@host
you make a copy of file
called user@host
in the current directory (locally).
With
scp file user@host:
you copy file
to the remote host host
and place it in the home directory of user
.
From the scp
manual:
The source and target may be specified as a local pathname, a remote host
with optional path in the form[user@]host:[path]
, or a URI in the form
scp://[user@]host[:port][/path]
. Local file names can be made explicit
using absolute or relative pathnames to avoidscp
treating file names
containing:
as host specifiers.
Note that it is the :
in the source or target filename operand that determines whether it specifies a remote or local location (in the first non-URI form of the argument).
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f461029%2fwhy-does-scp-seem-to-be-failing%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The scp
is not failing, but it isn't doing what you expect it to do.
With
scp file user@host
you make a copy of file
called user@host
in the current directory (locally).
With
scp file user@host:
you copy file
to the remote host host
and place it in the home directory of user
.
From the scp
manual:
The source and target may be specified as a local pathname, a remote host
with optional path in the form[user@]host:[path]
, or a URI in the form
scp://[user@]host[:port][/path]
. Local file names can be made explicit
using absolute or relative pathnames to avoidscp
treating file names
containing:
as host specifiers.
Note that it is the :
in the source or target filename operand that determines whether it specifies a remote or local location (in the first non-URI form of the argument).
add a comment |
The scp
is not failing, but it isn't doing what you expect it to do.
With
scp file user@host
you make a copy of file
called user@host
in the current directory (locally).
With
scp file user@host:
you copy file
to the remote host host
and place it in the home directory of user
.
From the scp
manual:
The source and target may be specified as a local pathname, a remote host
with optional path in the form[user@]host:[path]
, or a URI in the form
scp://[user@]host[:port][/path]
. Local file names can be made explicit
using absolute or relative pathnames to avoidscp
treating file names
containing:
as host specifiers.
Note that it is the :
in the source or target filename operand that determines whether it specifies a remote or local location (in the first non-URI form of the argument).
add a comment |
The scp
is not failing, but it isn't doing what you expect it to do.
With
scp file user@host
you make a copy of file
called user@host
in the current directory (locally).
With
scp file user@host:
you copy file
to the remote host host
and place it in the home directory of user
.
From the scp
manual:
The source and target may be specified as a local pathname, a remote host
with optional path in the form[user@]host:[path]
, or a URI in the form
scp://[user@]host[:port][/path]
. Local file names can be made explicit
using absolute or relative pathnames to avoidscp
treating file names
containing:
as host specifiers.
Note that it is the :
in the source or target filename operand that determines whether it specifies a remote or local location (in the first non-URI form of the argument).
The scp
is not failing, but it isn't doing what you expect it to do.
With
scp file user@host
you make a copy of file
called user@host
in the current directory (locally).
With
scp file user@host:
you copy file
to the remote host host
and place it in the home directory of user
.
From the scp
manual:
The source and target may be specified as a local pathname, a remote host
with optional path in the form[user@]host:[path]
, or a URI in the form
scp://[user@]host[:port][/path]
. Local file names can be made explicit
using absolute or relative pathnames to avoidscp
treating file names
containing:
as host specifiers.
Note that it is the :
in the source or target filename operand that determines whether it specifies a remote or local location (in the first non-URI form of the argument).
edited Aug 7 '18 at 18:14
answered Aug 7 '18 at 10:00
KusalanandaKusalananda
129k16243400
129k16243400
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f461029%2fwhy-does-scp-seem-to-be-failing%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown