Windows telnet different local echo behavior - telnet

When I connect to a web server using telnet on port 80, I need to enable local echo to see what I type. However, when I connect to a POP3 server (port 110) the local echo seems to be enabled by default. Why is that? What is the difference?

Related

Telnet inner-workings: Is telnet server necessary if client connects to an HTTP server?

One way to quickly test the first-order functionality of a web server is to use the application layer tool Telnet, e.g. How to send an HTTP request using Telnet.
This is the usage I am most familiar with, but today I learned there is such a thing as a Telnet server: https://askubuntu.com/questions/668725/how-can-the-telnet-service-on-ubuntu-server-14-04-lts-be-enabled, which listens on the well-known port 23 and can be used (though not usually, due to its lack of security) as a remote shell.
I am trying to understand if a Telnet server is necessary if I use it to connect to an HTTP server on port 80, e.g.,
telnet 192.168.0.5 80
Does the Telnet client first connect to the telnet server on port 23, then somehow the server's Telnet process then establish a connection to port 80 on localhost? Or does the client directly connect to the HTTP server (or some other TCP/IP server, for that matter) on 80, without need the Telnet server to be present at all?
I could not immediately find a piece of Telnet documentation that explains how Telnet works in this regard; their scarcity might be attributed to Telnet's lack of security...

Forward server HTTP traffic to handle in another device via SSH Tunnel

I'm developing some webhook required direct access public domain to internal machine, thinking use SSH tunnel to forward data, or got alternative solution?
Hosting server & development machine are in same network
192.168.1.2/24 (Hosting server)
2nd machine is virtual mapping using forticlient firewall without static or dynamic IP in visible in hosting server, so is 1 way initial communication right now.
In this case possible to setup SSH tunnel forward all traffic from 192.168.1.2:80 to handle in development machine port 8080?
How to ssh syntax look like?
Thanks.
This could be done by setting up an SSH tunnel to the remote machine:
ssh -L localhost:80:localhost:8080 development-system
Every request to port 80 on the hosting-server is now forwarded to port 8080 on the development-system.
Please note, that the port 80 on the hosting-server could only be used, when you start the SSH command as root. Also note that the port 80 is only accessible from the hosting-server. To access the port 80 on the hosting-server from everywhere use the following:
ssh -L 80:localhost:8080 development-system
Be sure that you want that.
A good introduction to the topic could be found at
https://www.ssh.com/ssh/tunneling/example
https://unix.stackexchange.com/questions/115897/whats-ssh-port-forwarding-and-whats-the-difference-between-ssh-local-and-remot

ssh can't connet between two servers by ssh with changing default port

I have two servers, I want to connect server1 to server2. I've configured the firewall between them, and they could be connected before I changed server2's default port.
Now I can connect to server2 by ssh on my mac, but when I try to connect to server2 on server1, I get this error:
ssh: connect to host [ip_address] port 49645: Connection refused
What's else can I do?
What is the current firewall configuration? Without more context, it seems you may need to configure the firewall to allow port 49645 incoming on server2. If you're getting a "connection refused," make sure that on server2 ssh localhost:49645 works and that ssh is running with your settings.

Connecting to Apache Server

After I have created my apache server, and installed LAMP, I have portforwarded port 80, and am able to reach the server on any browser using my external IP. When I go to connect to the server through ssh using my terminal on my MacBook, I can only connect to it using the servers inet (IPv4) IP address, and not the external IP address using port 80, for example, I can connect to it using: ssh root#192.168.1.204, but I cannot connect to it using: ssh -p 80 root#'external ip address'
the error I get is: ssh_exchange_identification: Connection closed by remote host
PLEASE IF ANYONE CAN HELP! I have been struggling with this for days.
Thanks
SSH is port 22, you can't use it to connect to port 80. If you added the port 80 portion to your first command as well, you should see the same error.

jvisualvm for remote host

I want to use jvisualvm's remote functionality to see live stats of a remote JVM.
I've started the jvisualvm from my windows machine but I don't know how to configure the remote connection.
On the remote machine (OS: Redhat Linux), tomcat is started with below jmx parameters:
-Dcom.sun.management.jmxremote"
-Dcom.sun.management.jmxremote.port=3030"
-Dcom.sun.management.jmxremote.authenticate=false"
-Dcom.sun.management.jmxremote.ssl=false"
netstat -lnp| grep 3030
tcp 0 0 0.0.0.0:3030 0.0.0.0:* LISTEN 30728/java
ssh connection is open to remote server and I tunneled the remote port 3030 on a certain local port but when I create new jmx connection (localhost:localport) in jvisualvm I get the below error
Cannot connect to localhost:10000 using service:jmx:rmi:///jndi/rmi://localhost:10000/jmxrmi
Can someone help me to create the connection?
First of all if you are making a remote connection, localhost connection doesn't make sense.
You need to start jstatd on the remote machine. For this purpose create a jstatd.all.policy file in the home directory of your remote machine and add the following lines:
grant codebase "file:${java.home}/../lib/tools.jar" {
permission java.security.AllPermission;
};
Then on the command line of your remote machine you will type ' jstatd -J-Djava.security.policy=jstatd.all.policy -J-Djava.rmi.server.hostname={Your Ip address} '
Once jstatd service start on the remote machine you basically add the remote connection Ip address connection on the jvisualVM UI using add remote host.
The Oracle documents for JvisualVM can be referred at https://docs.oracle.com/javase/8/docs/technotes/guides/visualvm/applications_remote.html but it is really confusing to understand jstatd steps.