You can see features, screenshots, documentation, changelog and other information at wbond.net/sublime_packages/sftp. The plugin has extensive functionality and support both working off of a server and mapping a local folder to a remote folder.
Early in the project I decided to make it a commercial plugin to help keep it going. I currently charge for $16 for a single-user license, which allows me to provide a high-level of support. The plugin can be installed and evaluated without a license, and includes a trial period just like ST2.
It seems the next big item on the list for functionality is remote server browsing and editing. This will allow for a more complete solution to #1, and address functionality desired by a number of other users.
This article is the second in a series about sublime text and how to set it up for remote development using the SFTP package. I suggest you refer to our previous article about the installation and configuration of sublime text 3.
Most of our development and deployment work will be happening in the remote server or cloud servers. In that case, we can use the sublime SFTP package to work with remote servers where we can push (Local to remote) or pull (Remote to Local) the codes/files using file transfer protocol. SFTP comes with a license cost but we can install the package and use it for an indefinite time.
We will now configure remote host information like hostname, username, and port. Password will be prompted when we start the sync. The hostname can be FQDN or IP address and by default port number is 22.
We have done some mandatory configuration in sftp-config.json to start syncing our files to the remote machine. We have a few more options to configure depending upon the need. But as of now, these are the important parameters that we need to get going. Now in my remote machine, my directory /home/tecmint is empty. We will upload the project folder to /home/tecmint now.
This is the same configuration file as the sftp-config.json file where we have to configure a second remote host. I have configured the second remote information and saved it. We can have multiple remote mapping configured.
So far in this article, we have seen how to install the SFTP package to transfer files between local and remote machines through file transfer protocol. We have also seen how to upload/Sync folders from Local to remote and remote to local machines. Default keybindings and how to set user-defined key bindings.
Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.
I am using Sublime Text editor with its SFTP plugin to edit files (also root files) on my server. I thought there is some linux command or file that can be edited that would enable me to execute sudo at every file save, and even at every file open. At every file operation. Because I connect the editors SFTP client with a user from the wheel group that can be root in a passwordless way when executing sudo su.
And I have disabled root login to secure SSH. So I added "sudo" in the sftp subsystem path in my sshd_config file on the server, and it works - it can save with root privileges, it has the same result as if people would add "sudo" in the winSCP client settings at the sftp path. But I was told this is not a secure way to enable sudo at file save, because then every client that connects with the correct credentials will be root, not just my own client.
So I am looking for a more secure way to execute sudo at every file operation when I am using my SFTP client (which is a Sublime Text plugin), this plugin: codexns.io/products/sftp_for_sublime. Could you recommend a way to do this correctly?
To install, simply open up Package Control through Ctrl+Shift+P, Select Install Package and select SFTP. You then have to configure the plugin for use on your current project. This is done through the SFTP/FTP context menu on the right click context menu of your root directory. Once configured, a sftp-config.json file will be created. This is where you tell the plugin where to map your local directory to on the remote server. The main changes I make are:
Finally, you will want to make sure you are authenticating in some way. You could use a password, but you really should be using public key authentication. As such, change the ssh_key_file property to point to the absolute path to your key file. This caused me some confusion initially as I used the id_rsa OpenSSH key I use for SSH under Cygwin. For *nix systems this should work fine, however on Windows it turns out that Sublime uses PSFTP (PuTTY SFTP) instead, so it expects a PuTTY private key file (.ppk extension). If you get a lot of Connection Refused errors from Sublime and No authentication found errors in the SSH logs, this could be the reason. If all is setup correctly, you should be able to push files to the remote server.
Just like Sublime Text itself, the plugin is not officially free. However, the trial never ends - just prompts you to purchase every so often. For more information on the plugin, visit the official page _packages/sftp.
Accessing your nanohub.org home directory can be done via SSH, SFTP and SCP terminal commands from your workstation (not workspace tool). I have found that via a GUI SFTP you can use your favorite text editor to edit files in your home directory. Below is an example for MacOs, the Sublime text editor and an SFTP client call Cyberduck. Follow a similar procedure for Windows.
4. After connecting you should see the list of files in your naonhub.org home directory and should see the same listing by executing "ls -al" from the terminal in the workspace tool. The image below shows how you can edit a file located on nanohub.org from the Sublime Text editor on your laptop. You may also double chick to perform the same action. Saving changes in Sublime will result in a notification that Cyberduck has completed an upload back to nanohub.org with the file modifications of the saved file.
File transfer is easy too. Just drag the file you wish to transfer over the Cyberduck file area and it will begin a transfer immediately. Take a look at the other Cyberduck features, in particular, bookmarks and history of the recently visited sftp sites.
A file containing SFTP/FTP connection credentials was found on this web server.
Some SFTP/FTP clients store SFTP/FTP connection details such as hostname, username, password in text files. For example Sublime SFTP is creating a file named sftp-config.json, FileZilla is storing the information in a file named recentservers.xml.
Sublime Text is a proprietary, cross-platform text editor designedfor people who spend huge amounts of time shuffling code around. Aprogrammer's editor, Sublime Text is a third option to the long-standing"Vi or Emacs" conundrum. Going beyond the basics of syntax highlightingand code folding, Sublime offers a litany of innovative and uniquefeatures. With version 3.0 just around the corner, I'm taking you on atour of Sublime's most compelling features and add-on packages.
At the time of this writing, Sublime Text version 2 is $70 US, and the upgradeto version 3 (which is currently in beta) will be paid. Version 2 isdownloadable as a trial, allowing you to get a feel for the editor foras long as you need before committing to buy. Because the applicationis available for Linux, Windows and Mac OS X, you do not need to buy aseparate license for each platform. $70 US mayseem like a lot for a text editor,but if you spend hundreds of hours a month in front of your editor,it's a worthy investment.
Most of the content in this article should apply to either Sublime Text 2or 3. Sublime Text 3 is not available for pre-purchase evaluation,so if you're new to Sublime Text, you'll be stuck with version 2 for now.You can download Sublime Text from
Start Sublime Text, and the first thing you're greeted with is acharcoal editor window. A traditional project sidebar is on the left, andon the right, is what Sublime calls the Minimap. The Minimap is a zoomed-out viewof the currently open file, which works a bit like a WYSIWYGscroll bar. Open some source code, and the Minimap provides a useful wayof navigating large files visually.
To view a full list of default key bindings, click on the Preferences Menuand choose "Key Bindings - Default". This will open up the system-widekey-binding file. To create your own key-binding preferences, choose"Key Binding - User", and use the same syntax as the default file.
Now to the heart of what makes Sublime Text such a powerful editor:its unique alchemy of text editing features. Sublime Text's most praisedediting feature is multi-selection, which is a little tricky to wrap yourhead around at first. Most editors let you select only one contiguous spanof text; some let you select text as a block. Sublime Text lets you selectmultiple noncontiguous spans of text and act on them collectively. Afteryou've begun using this feature, its power will become apparent to you,especially in editing code or any file with a formal syntax.
Using Sublime Text, such a task is easy. I'll select the first occurrenceof "raw_input" and press Ctrl-d. Pay close attention, and you'll noticethat both occurrences of raw_input are now selected, each with its ownblinking cursor. As I begin to type the word "input", both occurrencesare replaced. It is true that such a change could have been accomplished easily with search and replace, but I've only scratched thesurface with multiple selection.
Next, I'll want to replace the two "print" statements with Python3's "print" function, which means making the commands look likeprint(...). Because the text "print" occurs four times in thisdocument, the last technique won't work, so I'll show you another wayto make multiple selections. I'll begin by positioning my cursor on thefirst print statement. Then, I'll hold Ctrl while clicking on the otherprint statement.
b1e95dc632