Notepad++ NppFTP [SFTP] Connection failed : Error reading socket - ssh

Does anyone know why I am unable to connect to my server using the Notepad++ NppFTP plugin with SFTP?
I have a CentOS 6.4 server with SSH on port 22.
When I try and connect using NppFTP I get the following output:
[NppFTP] Everything initialized
Connecting
[SFTP] Connection failed : Error reading socket
Unable to connect
Disconnected
This used to work when I had my SSH port set to 3264 but when I changed the SSH port back to 22 NppFTP stopped working. All the settings for the profile are correct including the right IP, username, password and port (22).
I can connect with SFTP using FileZilla and WinSCP successfully with these same SFTP details and I can connect with SSH using PuTTY.
I can connect with SFTP to other servers using NppFTP so I believe there is an issue in my server config I'm just not sure where or what.

I looked at the access logs but found no attempt at a connection from NppFTP, I turned the firewall off and still nothing.
In the end I got in touch with my server company and it turns out it was a problem on their end. This is what they had to say:
"This was caused by an IPS rule inspecting the network packets coming into the infrastructure, which helps identify brute force attacks."
Very strange, but after they made the change NppFTP can now connect successfully.

Related

Connection timeout while trying to SSH

Hope I'm doing this right as this is my first StackOverflow question. I'm trying to SSH into a server, but running the ssh command results in a connection timeout (using the MobaXTerm client on Win10). I'm trying to connect on port 22, and have gone through Windows Firewall to make rules to open the port, but it's still not working. Any ideas as to why this is happening? I can provide relevant information as needed.
Thanks in advance!
That error message means the server to which you are connecting does not reply to ssh connection on port 22. I think three possible reasons for that:
The server has not installed ssh
You are running ssh with different port
The machine has a firewall that doesnot allow you to connect

After installing BigBlueButton 2.3-dev, I am unable to connect via SSH. Why?

I have a VPN server (on A2Hosting) with Ubuntu 18.04 installed. The server meets the minimum configuration required for BBB. I was able to connect to this server via ssh and installed BBB 2.3-dev. It installed successfully and I can access the main page in my browser. But, after install SSH is not working. When I try to connect, it says connection timeout.
ssh: connect to host 1xx.xxx.xxx.xx7 port xxx2: Connection timed out
I have tried resetting the server, reinstall operating system and bbb several times, but whenever bbb install without error, SSH stops working. I am facing this for last couple of days. Please suggest what can be the issue.
After a lot of digging, I found that the port was blocked by firewall. My hosting provider was using non-standard ssh port 7822. Unblockimg the port solved the issue.
ufw allow 7822

How to connect to OCI machine if the sshd is not responding?

I was updating the ssh port of an Oracle Cloud Infrastructure machine
I changed /etc/ssh/sshd_config
The port was
#Port 22
I changed it to
Port 40531
Then
restarted the sshd service systemctl restart sshd
open the port on the OCI Web
however, now I cannot connect.
ssh -vvv -p 40531 -i ~/.ssh/vm.key opc#129.xxx.xxx.xxx
OpenSSH_8.2p1, OpenSSL 1.1.1e 17 Mar 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolve_canonicalize: hostname 129.xxx.xxx.xxx is address
debug2: ssh_connect_direct
debug1: Connecting to 129.xxx.xxx.xxx [129.xxx.xxx.xxx] port 40531.
debug1: connect to address 129.xxx.xxx.xxx port 40531: Connection timed out
ssh: connect to host 129.xxx.xxx.xxx port 40531: Connection timed out
I saw a Cloud Shell but I'm not sure if it can be used to connect to the machine to perform maintenance tasks
Is there a way to connect to the VM from the web oci interface to fix the ssh issues?
I used to use a VPS service that has a web console from which you can enter to fix problems like this
is there something like this in OCI?
Note:
SELinux was disabled on the machine
if you are about to do this on your machine, remember to update the SELinux configuration prior restart the sshd service or you will be locked out, another option is to disable SELinux totally (this is what I did)
The changes above described worked well, the only thing that was causing issues on my side
(I don't really know why) is that I was connected from a VPN
After I disconnected the VPN and tried to connected again it worked
Update:
I figured out why the ssh using a different port was not working. The VPN I use is a corporate VPN which has very strict inbound and outbound rules, The VPN outbound rules were blocked by the TCP on port 40xxx.
Update:
if you are struggling with a VM you can connect using the below instruction
Creating the Instance Console Connection
Before you can connect to the serial console or VNC console, you need to create the instance console connection.
To create the console connection for an instance
Open the navigation menu. Under Core Infrastructure, go to Compute and click Instances.
Click the instance that you're interested in.
Under Resources, click Console Connection.
Click Create Console Connection.
Upload the public key (.pub) portion for the SSH key. You can browse to a public key file on your computer or paste your public key into the text box.
Click Create Console Connection.
When the console connection has been created and is available, the state changes to Active.
Thanks to #bmuthuv for the info
You can connect to Serial Console of the VM where you could get access to GRUB Menu during a Reboot operation. You can subsequently use typical Linux commands to get to Shell from Grub. You can subsequently undo anything you would like to.
Serial Console connection can be created on OCI Web Console in the Instance's page.

How to fix ngrok forwarding port?

I am ssh-ing onto a remote desktop. Since I have to connect over the internet, I have exposed the ssh port (22) on the remote side using ngrok, and everything is working great. I connect to the desktop using the command
ssh username#2.tcp.ngrok.io -p portno
where I get the portno from the remote side, when I start the ngrok service from the line that says
Forwarding tcp://2.tcp.ngrok.io:portno -> localhost:22
However, everytime I start a new ngrok session on the remote side, a new portno is generated. Now, unless I have a secondary connection open (typically using teamviewer), I would not be able to know what that port number is.
How can I start the ngrok service with a fixed portno. This is because I want to have the ngrok service on startup as I would have to restart my remote desktop a couple of times and still want to connect to the desktop using ssh.
Thanks.
You'll need to reserve a TCP address on ngrok, which will give you a fixed address.
To associate a tunnel with a reserved TCP address, you should include the remote-addr option in your ngrok config when starting the tunnel.
An example from the docs: ngrok tcp --region=us --remote-addr 1.tcp.ngrok.io:20301 22

SSH Auth Failed on Amazon EC2 - RSEG1066 Auth Failed

Sorry but I am a newbie... I have checked other questions but nothing has worked and I am not great with SSH.
Followed the steps to connect to EC2 with SSH in Eclipse. Worked like a charm. Then I terminated the working server and started a new instance.
Now I can't connect and receive
RSEG1066 "Failed to connect sshd on server name" Auth failed
Also Port 22 is open ->
Port 22 (SSH) Source: 0.0.0.0/0
My SSH connection references the new hostname and I have applied my .pem file via rsa. Any thoughts? What else should I check?
Thank you.
Seems many people are having this problem with AWS when terminating an instance and launching a new instance. Here is what I did to solve the problem for me.
Terminated instance
Deleted key pair from AWS console
Deleted key pair from client
Launched a new instance
When prompted, used a different name for my key pair (.pem) file
Choose the default security group
Added SSH / Port 22 inbound access to the security group
Connected (with user *ubuntu* since I am using an ubunutu server)
And if using Eclipse RSE like the tutorial link in the original question, be sure to restart Eclipse before connecting.