LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-08-2016, 09:49 AM   #16
vishawdeep
LQ Newbie
 
Registered: Mar 2016
Posts: 14

Original Poster
Rep: Reputation: Disabled
I am clueless now.


tried lcd /root/home/argo/Desktop, output was "couldnt change directory to /root/etc.. , no such directory or file exists. I am like super new to Linux.
 
Old 03-08-2016, 09:56 AM   #17
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by vishawdeep View Post
tried lcd /root/home/argo/Desktop, output was "couldnt change directory to /root/etc.. , no such directory or file exists. I am like super new to Linux.
Don't worry about it, but it would be a very useful idea for you to do some reading up on Linux basics. If not, to be honest, following online tutorials with a restricted idea of the underlying principles will cause you needless problems.

The directory you want is /home/argo/Desktop

/home contains all the users' home directories, except:
/root contains the root user's home directory
 
Old 03-08-2016, 10:05 AM   #18
vishawdeep
LQ Newbie
 
Registered: Mar 2016
Posts: 14

Original Poster
Rep: Reputation: Disabled
Problem using SFTP to copy files onto server

same error.
P.S I appreciate the help.
 
Old 03-08-2016, 10:08 AM   #19
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by vishawdeep View Post
same error.
P.S I appreciate the help.
Is the error on the lcd command or the put command?

As you can't cut and paste, can you please write out the complete command and the complete error message, character by character?

Thanks.
 
Old 03-08-2016, 10:16 AM   #20
vishawdeep
LQ Newbie
 
Registered: Mar 2016
Posts: 14

Original Poster
Rep: Reputation: Disabled
Problem using SFTP to copy files onto server

Below are the commands i have used so far.
Initially with PUT command
----------------------------------------------------
sftp>put Desktop/index.html
stat Desktop/index.html: No such file or directory
----------------------------------------------------
sftp>put /home/argo/Desktop/index.html
stat /home/argo/Desktop/index.html: No such file or directory
------------------------------------------------------

Now the lcd command

lcd /home/argo/Desktop
Could'nt change local directory to "/home/argo/Desktop": No such file or directory
 
Old 03-08-2016, 10:20 AM   #21
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Ok, unless there is something very obvious that I'm not seeing (which is probably going to turn out to be the case), have you tried using the lcd command to go step by step to your Desktop directory?

i.e. (assuming ssh is pointing locally at /root)

lcd ..

lcd home

lcd argo

lcd Desktop

Last edited by hydrurga; 03-08-2016 at 10:23 AM.
 
Old 03-08-2016, 10:25 AM   #22
vishawdeep
LQ Newbie
 
Registered: Mar 2016
Posts: 14

Original Poster
Rep: Reputation: Disabled
Problem using SFTP to copy files onto server

lcd /home --> worked
but after this i gave lcd /argo ---> same error, no such file or directory
 
Old 03-08-2016, 10:29 AM   #23
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by vishawdeep View Post
lcd /home --> worked
but after this i gave lcd /argo ---> same error, no such file or directory
Once you've got to /home, you want to do

lcd argo

not

lcd /argo
 
Old 03-08-2016, 10:32 AM   #24
vishawdeep
LQ Newbie
 
Registered: Mar 2016
Posts: 14

Original Poster
Rep: Reputation: Disabled
Problem using SFTP to copy files onto server

still same error
 
Old 03-08-2016, 10:37 AM   #25
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Ok, if you're still game to carry on,

Please tell me the results of:

lpwd

and

lls

After you've pasted this, don't do anything else with ssh until my next reply.
 
Old 03-08-2016, 10:38 AM   #26
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,749

Rep: Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928
If you want to transfer a file from your desktop to the web server you do not need to login via ssh first. From your Ubuntu desktop you can use scp like below:

scp Desktop/index.html root@server:/www/var/html/index.html

You can also use sftp but again you want to run the sftp command from your Ubuntu desktop.
 
Old 03-08-2016, 10:40 AM   #27
vishawdeep
LQ Newbie
 
Registered: Mar 2016
Posts: 14

Original Poster
Rep: Reputation: Disabled
Problem using SFTP to copy files onto server

sftp>lpwd
Local working directory: /home

sftp> lls
sftp>
 
Old 03-08-2016, 10:42 AM   #28
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925


Ok, I'm really sorry that I was unable to help you. Thanks for bearing with me.

You should do as michaelk advised.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to list files when connected to another server using SFTP in an automated script cmovva Linux - Newbie 3 02-11-2013 02:46 PM
how to copy files from server to server with root login disabled ? ratotopi Linux - Newbie 3 10-13-2012 12:44 PM
how to copy files to another server cj4331 Linux - Newbie 19 03-19-2008 07:28 AM
Copy files from my PC to server anjanesh Linux - Newbie 6 12-30-2005 12:28 AM
Files truncated by sftp/sftp-server at 65kb gato Linux - Networking 1 12-18-2003 10:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration