Directories missing when connecting to EC2 via FTP client (Transmit)

0

I successfully connected to my EC2 instance via Transmit (SFTP protocol, ec2-user and pem key). However, while I do have access to the instance after logging in I cannot see nor access any directories (only hidden files).

When I log into the instance from the terminal with ec2-user I, however, can navigate to /var/www/.

Any help to solve this would be really appreciated!

user8542506

Posted 2018-08-01T15:28:34.547

Reputation: 1

Answers

0

I did it as I outline in this blog post. Basically I create a new user and grant that user permissions. I don't know if it's the best way to do it, but it works fine.

I've copied the important parts here, but the blog post has a few more images that might help.

Create a user

sudo su
sudo useradd fred
passwd fred

Create some keys

su fred
ssh-keygen -f rsa

mkdir .ssh

touch .ssh/authorized_keys
chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

cat fred.pub >> /home/fred/.ssh/authorized_keys

Allow access

vi /etc/ssh/sshd_config
PasswordAuthentication no
AllowUsers ec2-user fred

Login

Use @. In FileZilla I set it up like this.

SFTP Login

Tim

Posted 2018-08-01T15:28:34.547

Reputation: 529