Password protection for the lwIP telnet connection - udp

I would like to protect the lwIP implemented telnet connection through the password.
This is a legacy product, in this used STX91 with the FreeRTOS, able to send and receive telnet commands. Is there a way to implement password protection like SSH connection etc...?

Related

can Telnet via SSH log into email server? am getting auth error

I am using Telnet on an Ubuntu 18.04 Server being accessed via SSH. I log into the email server being set up that uses PostFix and DoveCot, to test if the "phil#xxxxxxx.com" mail account is working.
This is the exchange:
root#xxxxxxx:/var/log# telnet xxxxxxx.com 110
Trying 2600:3c01::f03c:92ff:fe93:5fa0... Connected to xxxxxxx.com.
Escape character is '^]'. +OK Dovecot (Ubuntu) ready.
USER phil +OK
PASS fakepassword
-ERR [AUTH] Authentication failed.
I'm not trying to solve the entire mystery here, but just wanted to check on whether this is a valid use of Telnet. A website about using Telnet states the following:
However, you should note that Telnet is not encrypted. Most public
internet services, such as Google or Yahoo, require an encrypted
connection—which isn't supported by Telnet.
Is this a situation were the lack of encryption might contribute to the authentication failure? I'm guessing not, since I'm not going through a browser. I just wanted to verify that if everything was set up right, this would be a valid way to test the email account.
Yes, you can use telnet for protocol exploration. POP3 in this case is text based and not wrapped in TLS, so it works out without any other advanced tools (eg openssl).
That said you will want to familiarize yourself with the POP3 AUTH exchange, which is probably not going to accept credentials in cleartext these days. (If this were 1999, different story.)
https://ietf.org/rfc/rfc1939.txt
You might consider using an actual email program (MUA in the parlance) to negotiate the connection, in tandem with a protocol sniffer like wireshark to see how the exchange works.

How to connect db from local machine that can only be connected from windows remote desktop

The question says it all. But to elaborate.
I have a oracle db running at some remote host. ip: 10.0.0.121 port: 1521
It can be accessed when I connect to a windows remote desktop machine.
Now how can I connect to this remote db from my local machine?
I believe that localtunnel is similar to telebit in that you get an encrypted https connection, not a plain tcp connection (which is good).
If I understand correctly, you'll want to use localtunnel (or telebit or perhaps even ngrok) on the windows machine to expose its database connection to the outside world. You'll want to use https (and absolutely not tcp or http which would leak database passwords and all your data) to create the tunnel.
Then you'll need to run something like sclient (or stunnel) on the computer that's doing the connecting to "unwrap" the https connection back to plain tcp. It might look like this:
sclient example.localtunnel.me:443 localhost:1521
In your database client or application you would then use localhost:1521 in your database connection string (not the https address).
This gives you the security of an encrypted connection and the convenience of exposing ports out to the world, all without adding any complexity to your application or client - you just run it as normal, connecting to localhost.
Comment if you need any additional clarification.

FTPS client procedure for data connection

I am developping a FTPS client in a Embedded system with LWIP and mbedTLS stacks.
For now, what I do is :
Get an IP adress with DHCP
Get IP address of the server with DNS
Start a TCP connection to the server ( the control connection)
Telling the FTP server that I want to work with the TLS protocol with the command AUTH TLS
Handshake of the TLS protocol with the server
Validate the x509 certificate that the server sends
Telling the client that I want to work in passive mode and that i want to read a file with the command RETR.
Now, I need to open a data connection to read my file. So what I wanted to know is does the data connection is secured in the same way the control connection is ? That means do I have a certificate to validate ? Is the handshake the same ?
If this isn't clear let me know i'm not an expert at all in this area.
Thank you for your future responses
In explicit FTPS connection after you send AUTH command, the data connection is secured all the way. Depending on Active/Passive connection the data connection is opened through port 20(Active) or some random port negotiated(Passive).
You don't need any extra handshakes as far as I know.
You might or might not be able to configure if you want to reuse the same session ID created in opening the control channel. This is related for server to know that data connection has been established by the same client which opened the control channel. Some server require this, some servers allow this, some servers does not support this.

CF ssh command - how does it work?

When I login to bluemix, I supply credentials. So my understanding is that there is https connectivity underlying.
I am using cf ssh command to access a bluemix instance. When I added a -v flag, I saw a trace of very first API call.
I am confused about the ssh part because though I did not supply a ssh credential, the ssh is working. My understanding is that the ssh connectivity normally requires ssh credentials. I understand that multiple users can access the instance via ssh. However I am not sure where the ssh credentials come from for the ssh connectivity.
cf ssh basically does an ssh under the hood (using Golang's ssh APIs - it does not call out to an external ssh command) using a username and password as credentials.
The username passed in is the process guid of your app (which is the same as your app guid when using the CC V2 APIs). The password is a one time authorization code it retrieves from UAA (it calls cf ssh-code under the hood).
See also http://docs.cloudfoundry.org/devguide/deploy-apps/ssh-apps.html#other-ssh-access.
cf ssh -v logs the initial HTTP API communication with CC and UAA, but does not log the TCP level calls to the SSH endpoint.

Sending commands through ssh using vb.net

I have a project in which i need to send ssh commands to device using ip address, username and password through vb.net.
One of the commands i need to send is: /usr/share/qt-4.6.0/sendqtevent -kqt 0x01000012 -ks 0x25
Does vb.net even support ssh connections and what is the best way to do this?