0

I am using a host to try and deploy my Django site but I am confused by the SSH vs. FTP.

Background info:

I got the IP address, name and password from my host for the VPS.

I logged in using the same information via Putty and via WinSCP.

Both show me as having accessed root@[VPS IP Address].

Running ls on Putty shows nothing (no files or folders). So I created a file hello.txt.

WinSCP shows a lot of folders at the root, unlike Putty. I then searched all the folders for the hello.txt that I created and it's nowhere to be found.

Why would accessing the same VPS via two different methods show completely different things?

SitiSchu
  • 1,361
  • 11
  • 20
j s
  • 1

2 Answers2

1

If you are indeed sure that you are logged into the same host, with the same user account you should check that you are in the same folder.

Using ssh you can issue the command pwd (print working directory) to view the current the directory you are in. To change to another directory using the shell, use the cd command, for example:

cd ..   # This moves up to the parent directory
cd /var/www/html

The Winscp user interface should also show you in what directory you are currently in. Navigation to another directory using Winscp should be fairly straightforward.

Michael Anckaert
  • 853
  • 8
  • 12
1

There's no reason to think these methods will put you in the same directory location at all.

When you SSH in using Putty, you will almost certainly be put in your home directory, and that will be where your hello.txt was created.

But the FTP service has presumably been configured to put you in the common area where your service's files are located, which is not under your home directory. Where it is will be specific to the configuration of that machine.

Using SSH you will probably be able to use cd to change directory to the FTP location, if you can find out what it is; however, the reverse is not true and you almost certainly won't be able to navigate to the home directory via FTP.

(Note, this is not a question about Django, and should probably have been asked on ServerFault.)

Daniel Roseman
  • 588,541
  • 66
  • 880
  • 895