Notepad++ and SFTP connection issue - ssh

I am trying to connect to SFTP server using notepad++ plugin NppFTP. However, while connecting to the remote server I always get below error:
Connecting
[SFTP] Connection failed : Timeout connecting to <IP address>
Unable to connect
Disconnected
Here are the important configuration details set in NppFTP window for your reference:
Port: 22
Connection Type: SFTP
Authentication: Try password authentication
I tried to go through some of the solutions stated in few the questions in Stack Overflow but to no avail.
Would really appreciate your suggestions/pointers to resolve this. If it is related to SSH private key, would appreciate if you can provide the steps as well.
Edit: I am able to access the server using another FTP tool FileZilla which eliminates any mess with the access front.

You need to find out more about where the issue is:
Can you ping the server you are trying to connect to?
ping 166.178.233.70
Did you try connecting with another ftp tool, like FileZilla, that gives more detailed log information?
The possible issues are numerous:
The ftp server config: set up to exclude connections from certain ip addresses or domains, requires public/private keys...
Your local connection/VPN is not passing the connection.
It may require a

I got the same issue. The problem was solved after I updated NppFTP.

in my case, I changed the wifi connection then, it works.

Related

Vagrant SSH Connection refused - correct syntax?

I created a user using 'adduser' on a Ubuntu 18 virtual machine that I ssh'd into using Vagrant. I am now trying to ssh into the server using the user credentials I created. I keep getting connection refused. I believe it is my syntax that is causing this so what is the correct syntax for this?
Maybe add here your "code"
but Connection refused can be caused by several reasons.
SSH service is down, Wrong credentials, port is closed, wrong permissions or don't have permissions to connect at all.
Take a look here and try to solve it.

Apache Airflow unable to establish connect to remote host via FTP/SFTP

I am new to Apache Airflow and so far, I have been able to work my way through problems I have encountered.
I have hit a wall now. I need to transfer files to a remote server via sftp. I have not had any luck doing this. So far, I have gotten S3 and Postgres/Redshift connections via their respective hooks to work in various DAGs. I have been able to use the FTPHook with success testing on my local FTP server, but have not been able to figure out how to use SFTP to connect to a remote host.
I am able to connect to the remote host via SFTP with FileZilla, so I know my credentials are correct.
Through Google searching I have found the SFTPOperator, but am not able to figure out how to use it. I have also found FTPSHook, but still I have not been able to get it to work.
I keep getting the error nodename nor servname provided, or not known or a general Operation timed out in my Airflow logs.
Can someone point me in the right direction? Should I be using the FTPSHook with SSH or FTP Airflow Conn Type? Or do I need to utilize the SFTPOperator? I am also confused as to how I am supposed to setup the credentials in my Airflow connections. Do I use the SSH profile or FTP?
If I can provide any more additional info that may help, please let me know.
Cheers!
SFTPOperator is using ssh_hook underhood to open sftp transport channel that serves as a basis for file transfer. You can either configure ssh_hook by yourself or provide connection id via ssh_conn_id.
op = SFTPOperator(
task_id="test_sftp",
ssh_conn_id="my_ssh_connection",
local_filepath="",
remote_filepath="",
operation=SFTPOperation.PUT,
dag=dag
)

Cannot connect to RDS SQL Server Database using Management Studio

I created a SQL Server RDS Instance in AWS and it seems to be up and running, but if I try to connect to it using Management Studio I get this error:
Here is the text of the error:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - The wait operation timed out.) (Microsoft SQL Server, Error: 258)
I initially tried with the default security group that was created with the instance, but when that didn't work I created a new security group and modified the instance to use it.
Here you can see the details:
I tried this connection setup to connect:
Server Type: Database Engine
Server Name: valuationdlsdev.ck1qvjqhglyg.us-west-2.rds.amazonaws.com,1433
Authentication: SQL Server Authentication
Login: the Master User Login I created when creating the RDS Instance
Password: the Master User Password I created when creating the RDS Instance
I was kinda at my wits end and so I changed the setting on the Security Group to All traffic just to see if that would work, so here are all the settings on the security group:
At this point I'm wondering if port 1433 is not open, because I feel like I've tried everything. Could someone please help me.
Thanks.
In my case I opened the VPC Security group associated with my database
In the EC2 Security groups dashboard I selected Edit Inbound Rules from the actions dropdown and chose edit inbound rules.
At first, I looked at the inbound rules and thought everything was OK since this was the current setup
After all - if it was allowing all traffic, then what could possibly be wrong?
On a whim I added a rule for TCP port 1433. Ending up with this simple setup
Then it immediately started working for me.
Make sure it is publicly accessible, there is a radio button you have to check to make it publicly accessible.
Also add MS SQL inbound rule in inbound tab.After making the change wait for sometime so that the settings are updated in the instance.
In my experience this was counter-intuitive. With the options I selected, all ports and IPs seemed to be open, but after editing the inbound and outbound rules in the security group to have MS SQL for anywhere, I was able to connect.
For inbound rules, go to the VPC Security group of your database instance
In Inbound tab click modify
In column source change ip 0.0.0.0 by your IP by "My IP" or "Anywhere"
I had the same issue.
I ended up deleting the security group inbound rules, and just added a new inbound rule for port 1433, source being: 0.0.0.0
Image attached.
inbound rules
Thanks for the discussion here. Just post my finding in case anyone needs help in the future.
I initially followed this guide https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToMicrosoftSQLServerInstance.html.
then, I got some ideas from this post and figure out my particular issue in the end. https://forums.aws.amazon.com/thread.jspa?messageID=845682 The poster really did wonderful troubleshooting steps which could help fix most of the general Error 258 problems already. In the end I used the suggestion from the answerer to find out my problem.
In terms of my case of encountering error 258, I tried to connect to RDS SQL server 2016 inside a secure network from my workplace. When I switched to use the public network served by some Telecomm vendor, the connecting was succeeded.
If you want to access from different network were the instance was created, you'll need to open access to the IP range of where you want to access, by going to the "security group" assigned to your DB instance, and then adding the rule for your IP range.
PD. AWS by default only allow access from the IP range of the machine where you activated "public access" to the instance.
I was also not able to access it from my office laptop, but I was able to access it from my personal laptop. I think it is because of some company firewall rules.
In case anyone comes across this post looking for an answer, I just wanted to updated and make sure it's there if anyone needs it. The issue here turned out to be that I misunderstood the way "Publicly Accessible" works and set it to "Yes". Apparently it should have been set to "No". "Yes", however does work for the SQL Server Express version.

Apache Drill-embedded can't connect due to VPN

I'm trying to use Apache Drill in embedded mode (drill-embedded) however when it starts it shows an error:
Error: Failure in connecting to Drill: org.apache.drill.exec.pc.RpcException: CONNECTION : io.netty.channel.ConnectTimeoutException: connection timed out: /192.168.1.11:31010 (state=,code=0)
If I disconnect the corporate VPN it will startup just fine. Connections to the IP of the network adapter are being blocked by the VPN software, which is expected, so I need it to connect to the loopback (127.0.0.1) instead. How can I configure this? I have several other server/services running fine that use the loopback, but for whatever reason Drill insists on using the IP of the adapter.
I've tried various settings in drill-override.conf but can't seem to find the right one that would cause it to connect to the loopback.
Any ideas?
A similar question was asked on the mailing list, and the following answer by Aditya seems to have fixed the problem for the user:
Could you please check your "/etc/hosts" file for a possible
mis-configuration of "localhost" and ensure that all localhost names
are set to default.
I had the same problem and was able to work around it by setting the environment variable DRILL_HOST_NAME=localhost. I think you can also set this in conf/drill-env.sh, there's a line there that exports that environment variable and you can uncomment it and set a value.

Remote connection in sql connects one way

I have two sql instances:
instance-1 on server-A
instance-2 on server-R.
Both instances are on different domains. I can connect remotely to instance-1 from server-R successfully but I am unable to connect to instance-2 from server-A.
When I attempt the connection it throws error-26. I have allowed ports 1433,1434 through the firewalls and SQL Browser service is running on both servers.
What are some possible things I have overlooked?
There's an article about this on the MSDN blogs.
Click here to read: Error: 26 - Error Locating Server/Instance Specified
Suggestions from the article:
The client stack could not receive SSRP response UDP packet from SQL
Browser. It's easy to isolate the issue. Here are the steps:
1) Make sure your server name is correct, e.g., no typo on the name.
2) Make sure your instance name is correct and there is actually such
an instance on your target machine. [Update: Some application converts
\\ to \. If you are not sure about your application, please try both
Server\Instance and Server\\Instance in your connection string]
3) Make sure the server machine is reachable, e.g, DNS can be resolve
correctly, you are able to ping the server (not always true).
4) Make sure SQL Browser service is running on the server.
5) If firewall is enabled on the server, you need to put
sqlbrowser.exe and/or UDP port 1434 into exception.
Based on what you tried already, then maybe it could be a name typo, DNS or try both Server\Instance and Server\\Instance in your connection string.
The MSDN article have other notes to review as well.
About error 26 following link may help you probably:
http://www.codecandle.com/Articles/102/SQL/Administration/error-26-Error-Locating-Server-Instance-Specified%29-%28Microsoft-SQL-Server-Error-1%29/codedetail.aspx
Issue's source is high probability due to instance 2, not server A.
If you opened sqlbrowser port, also check if it actually listens via command prompt.