Can I use Sublime SFTP plugin (from here) to make an FTPS connection type?
I was previously working with Notepad++ and the NppFTP plugin but I want to migrate towards Sublime Text however I have problems using the SFTP plugin to connect to my server. Here is my configuration file:
"type": "ftps",
"sync_down_on_open": true,
"sync_same_age": true,
"host": "xxxxxxxxxxxxx.org",
"user": "xxxxx#xxxxxxxxxxxxx.org",
"password": "xxxxx",
"port": "21",
"remote_path": "/home/xxxxxxxx/public_html",
"connect_timeout": 30,
I've been trying to change the remote_path multiple times and I can't make it work. I've been getting this error:
Connecting to FTPS server "xxxxxxxxxxxxx.org" as "xxxxx#xxxxxxxxxxxxx.org" .... success
Validating remote folder "/home/xxxxxxxx/public_html" .. failure (Folder not found)
Multiple disconnection errors, giving up
In my Cpanel, the path for all the FTP users is set to /home/cpanel_username/public_html.
I've also tried setting remove_path to "/" and I get another error:
Validating remote folder "/" .... failure (Disconnected)
Any ideas how I can make it work?
If your control panel has already specified the path for FTP connection then your remote path should just be '/'. Otherwise you are likely attempting to access:
/home/xxxxxxxx/public_html/home/xxxxxxxx/public_html
If you've tested '/' and that still doesn't work, possibly attempt connecting with an interactive FTPS client so you can see the root folder structure?
I've been having this error today, totally out of the blue because I use Sublime's SFTP package daily.
I closed Sublime and reopened it... problem solved.
I encountered this error message when I had the wrong setting on the ftp_passive_mode. Just commenting it solved my problem.
Other (common) situations & errors that I've encountered were:
wrong server type: which gave the following error:
no port setting: which (weirdly) gave the following error:
wrong port setting: which gave the following error:
I really hope these basic list helps people.
Changed type to ftp even though it really SHOULD be ftps and it worked.
I had this problem while my local folder was inside OneDrive (I am using Windows 10). When I changed the location of the local folder to /Documents/someFolder it worked properly!
Try removing the ftp.
It worked for me like a charm
In my case, I faced this error when I copied sftp config file to another pc and tried to connect in that pc. Restarting PC did not work and then I deleted that sftp config file and created new one with the same configuration and the it worked
If someone having problem with IP address as a host. I got it working by using only ip address without trailing slash "/".
127.0.0.1
// sftp, ftp or ftps
"type": "ftps",
Change type as ftps and then also look for your root folder as you have defined while creating the ftp account.
You will have to know the paths that you have set up for FTP and not your local computer but the path to the directory you want to download on the server you want to connect to. ie: home/public_html/images or something.
For debugging, i suggest go to Preferences / Package Settings / SFTP / Settings
then add the lines
{
"debug": 2
,"debug_log_file": "/home/YOURUSER/sublime_sftp_debug.txt"
}
My problem was that the ftp credantials gave only read access to /, so i changed remote_path to /web
now you can see error logs in "/home/YOURUSER/sublime_sftp_debug.txt"
// sftp, ftp or ftps
"type": "ftps",
Use FTPS Worked like a charm for me.
No need to do changes in this lines
//"ftp_passive_mode": true,
//"ftp_obey_passive_host": false,
//"ssh_key_file": "~/.ssh/id_rsa",
Let them commented
Related
I have a working config for my sublime SFTP on sublime 3 which I have running on a Windows device.
I've tried to set up the same exact configuration on my mac device and I get a timeout error.
The mac device can access command line sftp and filezilla just fine, but sublime sftp won't work.
Here's my config file.
{
"type": "sftp",
"sync_down_on_open": true,
"upload_on_save":true,
"host": "xx.xxx.xx.xx",
"user": "ubuntu",
"remote_path": "/var/www",
"connect_timeout": 120,
"keepalive": 120,
"ssh_key_file": "/Users/Username/.ssh/File.ppk"
}
All I get in response is
Connecting to SFTP server "xx.xxx.xx.xx" as "ubuntu" ..... failure (Connection timeout)
I've also tried with the aws public dns but that doesn't work either.
Any help would be really appreciated.. I've been fighting with this for hours.
I have been facing the same issues since upgrading to macOS Ventura.
Navigate to ~/.ssh/ folder, e.g. cd ~/.ssh/
Open config with your editor
Add HostKeyAlgorithms +ssh-rsa,ssh-dss at the bottom under Host *
I'm tring to work on php project using NetBeans v8.1 with remote server connection.
I've tried active mode but when saving the file it gives me this error:
I won't open a connection to 192.168.1.100 (only to 197.133.xxx.xx)
So I changed the connection mode to passive mode.
When I try to save the file to upload, a new file created on the server directory with .new extension (ex. index.php.new) and it's empty, and Netbeans gives me this error:
Upload files on save failed.
For the information: My FTP encryption: "Explicit FTP using TLS"
And when I Press on "Test Connection", it gives me "connection succeeded"
Screenshot of the connection
Any Help will be appreciated.
I just had the same issue and it appears to be a server communication issue using TLS in passive mode.
Try ticking the box "Encrypt Only Authentication Process" - did the trick for me :)
I was trying to download a file form FTP server(Remote machine) using pentaho kettle (Get a file with FTP), I can able to do that in my local machine. But when i try to deploy the app in jboss web server it fails to download resulting in a error "Error getting files from FTP : Login incorrect."
But everything seems to be correct regarding the login details.
Did i have configure any where else in the server? Please help.
There are several things you could check in this case:
Check that the security settings of the remote FTP server allows for the machine that runs the job to establish an FTP connection. If you have access to the server, try the following command to ensure that the server has access:
telnet <your-remote-ftp-server-host> 21
# Or try:
telnet <your-remote-ftp-server-host> 22
Verify that the remote FTP server respects FTP connection requests, otherwise try SFTP (Get a file with FTP & Get a file with SFTP are two entirely different job steps in Kettle)
Wherever you are fetching your FTP credentials from (ideally a configuration file), test that the credentials are properly read by the job in the relevant scope - use the Write To Log step for that matter
I was looking for an IDE that will allow me to import all the necessary files to develop and debug Magento modules and found Zend Studio came recommended. I am having trouble connecting to my ftp to download the files. I created a remote connection using all of the credentials I had on Filezilla and when I test the connection it will succeed. Now when I go to the next step it tells me:
The project directory you have entered does not exist on the server.
Please enter a valid project directory
The host name matches my ftp server, username and password are valid, the directory I'm connecting to exists on the server, and I'm on port 21 which is not interrupted by my firewall. I don't know if I should stick with Zend or not and I haven't been able to properly test it. Any advice on fixing this issue or any other IDE recommendations would be appreciated. Thanks!
the directory I'm connecting to exists on the server
Double-check that. Note, that the path you enter is relative:
there's a "Initial Directory" in "Remote Connection Profile", and "Project Directory" in project properties->"Remote Server Support"
I have setup a new EC2 instance on AWS and I'm trying to get FTP working to upload my application. I have installed VSFTPD as standard, so I haven't changed anything in the config file (/etc/vsftpd/vsftpd.conf).
I have not set my port 21 in the security group, because I'm doing it through SSH. I log into my EC2 through termal like so
sudo ssh -L 21:localhost:21 -vi my-key-pair ec2-user#ec2-instance
I open up filezilla and log into local host. Everything goes fine until it comes to listing the directory structure. I can log in and right and everything seems fine as you can see below:
Status: Resolving address of localhost
Status: Connecting to [::1]:21...
Status: Connection established, waiting for welcome message...
Response: 220 Welcome to EC2 FTP service.
Command: USER anonymous
Response: 331 Please specify the password.
Command: PASS ******
Response: 230 Login successful.
Command: OPTS UTF8 ON
Response: 200 Always in UTF8 mode.
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/"
Command: TYPE I
Response: 200 Switching to Binary mode.
Command: EPSV
Response: 229 Entering Extended Passive Mode (|||37302|).
Command: LIST
Error: Connection timed out
Error: Failed to retrieve directory listing
Is there something which I'm missing in my config file. A setting which needs to be set or turned off. I thought it was great that it connected but when it timed out you could picture my face. It meant time to start trawling the net try and find the answer! Now with no luck.
I'm using the standard Amazon AMI 64 bit. I have a traditional lamp setup.
Can anyone steer me in the right direction? I have read a lot about getting this working but they are all incomplete, as if they got bored half way through typing up how to do it.
I would love to hear how you guys do it as well. If it makes life easier. How do you upload your apps to a EC2 instance? (Steps please - it saves a lot of time plus it is a great resource for others.)
I figured it out, after the direction help by Antti Haapala.
You don't even need VSFTP setup on the instance created. All you have to do is make sure the settings are right in FileZilla.
This is what I did (I'm on a mac so it should be similar on windows):
Open up file zilla and go to preferences.
Under preferences click sftp and add a new key. This is your key pair for your ec2 instance. You will have to convert it to the format FileZilla uses. It will give you a prompt for the conversion
Click okay and go back to site manager
In site manager enter in your EC2 public address, this can also be your elastic IP
Make sure the protocol is set to SFTP
Put in the user name of ec2-user
Remove everything from the password field - make it blank
All done! Now connect.
That's it you can now traverse your EC2 system. There is a catch. Because you are logged in as ec2-user and not root you will not be able to modify anything. To get around this, change the group ownership of the directory where your application will lie (/var/www/html) or what ever. I would change it so it is on a EBS volume. ;) Also make sure this group has read write and execute permissions. The group for the ec2-user is ec2-user. Leave everyone else as nothing. So the command you use while logged in via ssh
sudo chgrp ec2-user file/folder
sudo chmod 770 file/folder
Hope this helps someone.
FTP is a very troublesome protocol because it requires a secondary pipe for the actual data transfer and does not definitely work well when piped. With ssh you should use SFTP which has nothing to do with FTP but is a completely different protocol.
Read also on Wikipedia
Adding the key to www is a recipe for disaster! Any minor issue with your app will become a security nightmare.
As an alternative to ftp, consider using rsync or a more "mature" deploy strategy based on capistrano for instance. There are plenty of tools for that around.
Antti Haapala's tips are the only way to work around with EC2 SFTP. It works just fine! Just note that you need to create the /var/www/.ssh/ folder and copy the authorized_keys file there.
After that you'll need to change authorized_keys ownership to www-data so ssh connection can recognize it. Amazon should let people know that. I looked for this in there forums, FAQ, etc. No clue at all... Cheers once more to stackoverflow, the way to go haha!