I'm trying to connect my Atom to a Hostek hosting by FTP ... and their FTP connections will require Explicit FTP over TLS (FTPES).
{
"protocol": "ftp",
"host": "ftp.mysite.com",
"port": 21,
"user": "myuser",
"pass": "**********",
"promptForPass": false,
"remote": "/",
"secure": false,
"secureOptions": null,
"connTimeout": 10000,
"pasvTimeout": 10000,
"keepalive": 10000,
"watch": []
}
Probably late, but you'll want to use "secure": "control".
Now, for the cert verification error, you'll need to add:
"secureOptions" : {
"rejectUnauthorized": false
}
So the connection does not fail when cert verification does. This may introduce security risks: Node.js Hostname/IP doesn't match certificate's altnames
Related
How can we do to set up the consul use a previous certificate created for the tomcat?
We only have server.jks file used in tomcat, and we need to use the same tomcat certification.
How can we do to extract this information below?
"ca_file": "cert/ca.pem",
"cert_file": "cert/server.pem",
"key_file": /cert/serverkey.pem",
The server.conf
{
"bootstrap": true,
"server": true,
"datacenter": "dc1",
"data_dir": "data",
"verify_incoming": true,
"verify_outgoing": true,
"verify_server_hostname": true,
"auto_encrypt": {
"allow_tls": true
},
"log_level": "INFO",
"enable_agent_tls_for_checks": true,
"enable_syslog": false,
"ui_config": {
"enabled": true
},
"ports": {
"http": -1,
"https": 8500
}
}
I am a beginner with sublime text 3. Previous I worked with dream viewer. When I was working with dream viewer, Generally I do keep my project folder in D drive and add new local server in htdoc folder using dream viewer add site option.
Now I need to use sublime text 3 as same I did with dream viewer. I setup a new server using FTP plugin as below
// sftp, ftp or ftps
"type": "ftp",
"sync_down_on_open": true,
"sync_same_age": true,
"host": "127.0.0.1",
"user": "root",
"password": "ashan",
//"port": "22",
"remote_path": "/xampp/htdocs/sanka_d/",
My remote connection as below (sftp-config.jason)
"type": "ftp",
"save_before_upload": true,
"upload_on_save": true,
"sync_down_on_open": false,
"sync_skip_deletes": false,
"sync_same_age": true,
"confirm_downloads": false,
"confirm_sync": true,
"confirm_overwrite_newer": false,
"host": "127.0.0.1",
"user": "root",
"password": "ashan",
//"port": "22",
"remote_path": "/",
When I try to connect with remote server it says below error message.
Connecting to FTP server "127.0.0.1" as "root" ........ failure (Disconnected)
Please help me solve this, Thanks!
I am trying to connect to my cpanel server using sublime text 3.
Server is added successfully. And remote path is also validated successfully.
But when try to Sync Remote->Local it is just not happening.
{
// The tab key will cycle through the settings when first created
// Visit http://wbond.net/sublime_packages/sftp/settings for help
// sftp, ftp or ftps
"type": "ftp",
"save_before_upload": true,
"upload_on_save": true,
"sync_down_on_open": false,
"sync_skip_deletes": false,
"sync_same_age": true,
"confirm_downloads": false,
"confirm_sync": true,
"confirm_overwrite_newer": false,
"host": "XXXXXX",
"user": "XXXXX",
"password": "XXXXXXX",
"port": "21",
"remote_path": "XXXXXX",
"ignore_regexes": [
"\\.sublime-(project|workspace)", "sftp-config(-alt\\d?)?\\.json",
"sftp-settings\\.json", "/venv/", "\\.svn/", "\\.hg/", "\\.git/",
"\\.bzr", "_darcs", "CVS", "\\.DS_Store", "Thumbs\\.db", "desktop\\.ini"
],
//"file_permissions": "664",
//"dir_permissions": "775",
//"extra_list_connections": 0,
"connect_timeout": 30,
//"keepalive": 120,
//"ftp_passive_mode": true,
//"ftp_obey_passive_host": false,
//"ssh_key_file": "~/.ssh/id_rsa",
//"sftp_flags": ["-F", "/path/to/ssh_config"],
//"preserve_modification_times": false,
//"remote_time_offset_in_hours": 0,
//"remote_encoding": "utf-8",
//"remote_locale": "C",
//"allow_config_upload": false,
}
And in the console I finally got this:
"Select via quick panel? No".
And the process got terminated by itself.
SFTP has some options for that to put on your sftp-config.json file at the root of your folder :
Set those values like this:
"confirm_downloads":false,
"confirm_sync":false,
"confirm_overwrite_newer":true
I have created a master token using the below command:
$ consul keygen
G74SM8N9NUc4meaHfA7CFg==
Then, I bootstrapped the server with the following config.json:
{
"server": true,
"datacenter": "consul",
"data_dir": "/var/consul",
"log_level": "INFO",
"enable_syslog": true,
"disable_update_check": true,
"client_addr": "0.0.0.0",
"bootstrap": true,
"leave_on_terminate": true,
"encrypt": "G74SM8N9NUc4meaHfA7CFg=="
}
The output of the bootstrap server is as follows:
Node name: 'abcd'
Datacenter: 'consul'
Server: true (bootstrap: true)
Client Addr: 0.0.0.0 (HTTP: 8500, HTTPS: -1, DNS: 8600, RPC: 8400)
Cluster Addr: x.x.x.x (LAN: 8301, WAN: 8302)
Gossip encrypt: true, RPC-TLS: false, TLS-Incoming: false
Atlas: <disabled>
Then, I added a new server as a regular consul server which has the following config.json:
{
"server": true,
"datacenter": "consul",
"data_dir": "/var/consul",
"log_level": "INFO",
"enable_syslog": true,
"disable_update_check": true,
"client_addr": "0.0.0.0",
"bootstrap": false,
"leave_on_terminate": true,
"ui_dir": "/usr/local/bin/consul_ui",
"check_update_interval": "0s",
"ports": {
"dns": 8600,
"http": 8500,
"https": 8700,
"rpc": 8400,
"serf_lan": 8301,
"serf_wan": 8302,
"server": 8300
},
"dns_config": {
"allow_stale": true,
"enable_truncate": true,
"only_passing": true,
"max_stale": "02s",
"node_ttl": "30s",
"service_ttl": {
"*": "10s"
}
},
"advertise_addr": "y.y.y.y",
"encrypt": "G74SM8N9NUc4meaHfA7CFg==",
"retry_join": [
"x.x.x.x",
"y.y.y.y"
]
}
Note: Here, x.x.x.x is IP address of the bootstrap server, y.y.y.y is IP address of the regular server.
For testing purpose, I changed the encrypt key on one of the servers. And, when I do consul members, I can still see the all IPs which means that the servers are still able to communicate even with the different encrypt key. It seems that the gossip encryption is not working fine.
A Consul instance will cache the initial key and re-use it. It is stored in the serf folder in the file local.keyring.
This is counter-intuitive, but it is documented at least in one place together with the encrypt option.
You'll need to delete this file and restart Consul in order to get the expected behaviour.
I use Sublime text SFTP to work on my remote servers, and when I hit Ctrl-S, it uploads automatically to the remote. However, on my EC2 server, Ctrl-S only saves the local temp file, and I need to use the context menu SFTP > Upload File to save.
Any options to enable the remote save on ctrl-s?
Here's the config.json I use :
"type": "sftp",
"sync_down_on_open": true,
"sync_same_age": true,
"host": "xxx.amazonaws.com",
"user": "xxx",
"remote_path": "/var/www",
"connect_timeout": 30,
"ftp_passive_mode": true,
"ssh_key_file": "D:\\xxx.ppk",
"remote_time_offset_in_hours": 1,
I tried the following :
"save_before_upload": true,
"upload_on_save": true,
sftp_flags instead of ssh_key_file
but nothing has worked so far
Hope this helps you, it worked for me.
{
"type": "sftp",
"sync_down_on_open": true,
"host": "<your ec2 instance hostname>",
"user": "<your username>",
"remote_path": "<your remote path>",
"connect_timeout": 30,
"sftp_flags": ["-o IdentityFile=~<path to .pem file>"]
}
See: https://stackoverflow.com/a/17310355/1858217
Use sftp_flags as following, it should work.
"sftp_flags": ["-i", "/Users/username/pemfile.pem"],
In windows you should use this syntax.
"ssh_key_file": "/Users/Diego/Documents/SSH/Key.ppk",