Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
3
votes
2
answers
159
views
Remote control of GRUB?
Is there any way to remote control GRUB? I am interested in not having to walk to the machine when it reboots. As such, I am only interested in non-virtualized solutions. In particular, I want remote access to the GRUB console. The ability to select an entry, or edit the options, or even do somethin...
Is there any way to remote control GRUB?
I am interested in not having to walk to the machine when it reboots. As such, I am only interested in non-virtualized solutions.
In particular, I want remote access to the GRUB console. The ability to select an entry, or edit the options, or even do something completely new. In short, full control.
I would be interested in solutions involving VNC, SSH, telnet, or even raw network connections (via netcat or the like). Or something else if there is such a (software) solution. (Security is not *yet* a concern.)
Note that I'm not interested in remote control of the booted OS. I also want more direct control than
grub-reboot
provides.
Since everyone is suggesting it: I am **not** interested in a device specific **hardware** solution. I want something I can install on dozens of machines in their GRUB configuration to allow their GRUB boots to be remote controlled.
David G.
(3419 rep)
Jun 20, 2025, 04:04 PM
• Last activity: Jun 26, 2025, 07:37 PM
0
votes
0
answers
34
views
Why does Ctrl+C clear the current input line in my Python socket-based Telnet-like shell?
I'm building a simple shell server using raw Python sockets (not using telnetlib). The client connects using PuTTY with the Telnet connection type. The server displays a basic prompt like: [user@hostname:~]# --- ## The issue: ## When I type a command (for example, wh0ami) and press Ctrl+C, the entir...
I'm building a simple shell server using raw Python sockets (not using telnetlib). The client connects using PuTTY with the Telnet connection type.
The server displays a basic prompt like:
[user@hostname:~]#
---
## The issue: ##
When I type a command (for example, wh0ami) and press Ctrl+C, the entire line is wiped and only a fresh prompt appears:
[user@hostname:~]# wh0ami ← typed input
^C ← pressed Ctrl+C
[user@hostname:~]# ← result: input line cleared
---
## What I expect: ##
In typical terminal behavior (like Bash or real Telnet servers), I would expect to see something like:
[user@hostname:~]# wh0ami^C
[user@hostname:~]#
But in my case, the previously typed input disappears completely after pressing Ctrl+C.
---
## Notes: ##
- I’m not using raw terminal mode — and I’m unable to use it for my use
case.
---
## Question: ##
Why does Ctrl+C cause the current input line to be cleared in this setup?
Is this normal Telnet behavior, or am I missing something related to how the input buffer or terminal display should be handled? What's the solution to this?
Thanks in advance.
---
just.callme.client
(51 rep)
Jun 17, 2025, 07:39 AM
1
votes
1
answers
2861
views
Expect script + automated telnet process between three Linux machines
Is it possible to do the following by expect script? I have Linux server that connected to **linux_machine1** and **linux_machine1** connected to **linux_machine2** My Linux server have access only to **linux_machine1** ( linux server can telnet to **linux_machine1** but can’t telnet to **linux_mach...
Is it possible to do the following by expect script?
I have Linux server that connected to **linux_machine1** and **linux_machine1** connected to **linux_machine2**
My Linux server have access only to **linux_machine1** ( linux server can telnet to **linux_machine1** but can’t telnet to **linux_machine2** )
But from **linux_machine1** I have access VIA telnet to **linux_machine2**
So my question is:
I need to develop expect script that perform telnet from the Linux server to **linux_machine1**
then expect will perform telnet to **linux_machine2** from **linux_machine1** and will copy the **/etc/hosts** file from **linux_machine2** to my Linux server
Is this scenario can be implemented by expect script?
Short example that descript the process:
( run expect from Linux server ) --> linux_machine1 --> linux_machine2
Linux server <-- /etc/hosts from linux_machine2 <--
* remark - expect script need to be activate from the linux server
user58412
Apr 29, 2014, 01:47 AM
• Last activity: Jun 14, 2025, 04:05 AM
0
votes
1
answers
2348
views
ufw won't allow connections to postgres port 5432
With `ufw disable` on remote postgres system i'm able to connect from my local system However, the connection does not work when I `ufw enable` as shown below: C:\Users\HOME>telnet 80.240.24.195 5432 Connecting To 80.240.24.195...Could not open connection to the host, on port 5432: Connect failed Be...
With
ufw disable
on remote postgres system i'm able to connect from my local system
However, the connection does not work when I ufw enable
as shown below:
C:\Users\HOME>telnet 80.240.24.195 5432
Connecting To 80.240.24.195...Could not open connection to the host, on port 5432: Connect failed
Below is my postgres configuration at the time of restart.
cat /etc/postgresql/12/main/postgresql.conf
# - Connection Settings -
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost'; use '*' for all
# (change requires restart)
port = 5432 # (change requires restart)
max_connections = 100 # (change requires restart)
#superuser_reserved_connections = 3 # (change requires restart)
unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories
cat /etc/postgresql/12/main/pg_hba.conf
# Database administrative login by Unix domain socket
local all postgres peer
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all 0.0.0.0/0 md5
# IPv6 local connections:
host all all ::1/128 md5
telnet works when tried from the postgres host itself, but then I try to make the connection from my local laptop it fails.
root@DKERP:/# ufw status numbered
Status: active
To Action From
-- ------ ----
[ 1] 22 ALLOW IN Anywhere
[ 2] 8069 ALLOW IN Anywhere
[ 3] 443/tcp DENY IN Anywhere
[ 4] 443 DENY IN Anywhere
[ 5] 80/tcp DENY IN Anywhere
[ 6] 80,443,5432/tcp DENY IN Anywhere
[ 7] 80 DENY IN Anywhere
[ 8] 4433/tcp DENY IN Anywhere
[ 9] 5432/tcp ALLOW IN Anywhere
22 (v6) ALLOW IN Anywhere (v6)
8069 (v6) ALLOW IN Anywhere (v6)
443/tcp (v6) DENY IN Anywhere (v6)
443 (v6) DENY IN Anywhere (v6)
80/tcp (v6) DENY IN Anywhere (v6)
80,443,5432/tcp (v6) DENY IN Anywhere (v6)
80 (v6) DENY IN Anywhere (v6)
4433/tcp (v6) DENY IN Anywhere (v6)
5432/tcp (v6) ALLOW IN Anywhere (v6)
Can you please suggest what needs to be further done to get the postgres to connect to work from my local laptop?
Ashar
(527 rep)
Jan 9, 2022, 02:43 PM
• Last activity: May 5, 2025, 02:00 PM
0
votes
1
answers
2904
views
Use a script for a telnet session
I have a problem with my script. It seems my password is wrong. #!/usr/bin/expect set ip [lindex $argv 0] spawn telnet $ip set timeout 10 expect "Login:" send "administrator\r" expect "Password:" send "123456" send "\r" It says, `login incorrect`. But it works, when i use `cmd` on Windows to telnet...
I have a problem with my script. It seems my password is wrong.
#!/usr/bin/expect
set ip [lindex $argv 0]
spawn telnet $ip
set timeout 10
expect "Login:"
send "administrator\r"
expect "Password:"
send "123456"
send "\r"
It says,
login incorrect
. But it works, when i use cmd
on Windows to telnet to my phone, it works with "administrator" and 123456 as password.
I don't know why in my script, I could not log on successfully.
I have to use this script to downgrade/upgrade my phones.
Xiuur
(1 rep)
Feb 13, 2015, 11:08 AM
• Last activity: May 3, 2025, 05:06 PM
10
votes
5
answers
1205
views
How to check multiple hosts for simple connectivity?
I need a tool that tells me if a connection to a host is open or not -- no data to send or receive, just see if the connection is successful. Today I use telnet. $ telnet myhost myport Trying 192.168.1.99... Connected to myhost. Escape character is '^]'. ^[^] telnet> quit Connection closed. ... but...
I need a tool that tells me if a connection to a host is open or not -- no data to send or receive, just see if the connection is successful.
Today I use telnet.
$ telnet myhost myport
Trying 192.168.1.99...
Connected to myhost.
Escape character is '^]'.
^[^]
telnet> quit
Connection closed.
... but I need to have manual input there: the
^]
and then also the quit
.
I need to check several hosts, and that's too much for my simple method.
How can I do check for connectivity to multiple hosts more effectively? I would prefer to use a pre-existing tool.
chris01
(869 rep)
Dec 12, 2024, 04:43 PM
• Last activity: Jan 17, 2025, 12:15 PM
0
votes
0
answers
21
views
How to configure persistent packet filtering (SMTP, Telnet) on 3 Linux Ubuntu instances on docker? IP Tables rules do not apply or are too restrictive
Problem: I have to configure 3 Linux instances that run on docker containers on OpenStack. Routers: Rout, Pout, Mout Rout - should block SMTP & Telnet connections that come from HostR1 on interface sw0.4 and try to go outside the LAN/station (i.e. any other interface) Pout - should block any connect...
Problem:
I have to configure 3 Linux instances that run on docker containers on OpenStack.
Routers: Rout, Pout, Mout
Rout - should block SMTP & Telnet connections that come from HostR1 on interface sw0.4 and try to go outside the LAN/station (i.e. any other interface)
Pout - should block any connections coming from HostP1 trying to access Mout on port 9139 that runs a python tracker script (UDP)
Mout - should block ALL external connections (i.e. IPs outside the station) toward HostM1 except icmp and ssh.
! Important: Do not block connections and answers initialized by and towards HostM1. Use stateful rules (Connection tracking)!
Mout is connected to Rout on interface sw0.5 and Rout is connected to MainHost on interface to-host. MainHost is also connected to Pout on interface or-pout.
My solution which does not work:
On Rout:
up iptables -A FORWARD -s 10.26.102.67 -p tcp --dport telnet -j REJECT
up iptables -A FORWARD -s 10.26.102.67 -p tcp --dport 25 -j REJECT
iptables -L -n -v: Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination
1 60 REJECT tcp -- * * 10.26.102.67 0.0.0.0/0 tcp dpt:23 reject-with icmp-port-unreachable 0 0 REJECT tcp -- * * 10.26.102.67 0.0.0.0/0 tcp dpt:25 reject-with icmp-port-unreachable
On Pout:
up iptables -A FORWARD -s 10.26.102.194 -p udp -d 10.26.102.66 --dport 9123 -j REJECT
up iptables -A FORWARD -s 10.26.102.194 -p udp -d 10.26.102.129 --dport 9123 -j REJECT
up iptables -A FORWARD -s 10.26.102.194 -p udp -d 172.30.139.245 --dport 9130 -j REJECT
up iptables -A FORWARD -s 10.26.102.194 -p udp -d 172.30.139.241 --dport 9130 -j REJECT
On Milano: -no solution yet
The commands seen above on Rout and Pout are in a .conf file which apply on reboot or by using: ifdown --force -a && ifup -a.
ifdown-ng is already installed & I can't install no other packages on these instances because my instances will break.
I can see that the first rule on Rout rejected some packages but the checker I am using still says: WARNING: some required outbound traffic is blocked (try to remove some rules)!
booluser
(1 rep)
Dec 12, 2024, 04:24 PM
• Last activity: Dec 12, 2024, 04:28 PM
0
votes
2
answers
299
views
Transferring a file with ymodem over TCP network
I have a device (RELAY) I am able to telnet into using its IP address from an linux machine (CLIENT) and I'd like to copy a file from the RELAY to the CLIENT. I have very limited privileges on RELAY, but I can view a list of files on it with `file dir`, and then I should be able to download a file f...
I have a device (RELAY) I am able to telnet into using its IP address from an linux machine (CLIENT) and I'd like to copy a file from the RELAY to the CLIENT. I have very limited privileges on RELAY, but I can view a list of files on it with
file dir
, and then I should be able to download a file from it using YModem, per the manufacturer, who instructed that the command to send the file is
file read filename.ext
After typing that it displays
> #000 Ready to send file
but I'm not sure how to set up a method to receive the file on CLIENT I have full access to. I've read in this post to receive using minicom
, but that appears to be for a serial connection and I'm doing this over a TCP network. I've tried with sz
as well and tried to use the --tcp
options, but again am not sure if it's simply me not understanding which options to use or if this method isn't correct.
What are possible methods for me to connect to RELAY from CLIENT and tell it I'm ready to receive the file?
(edit) I had a request to edit this question about why it's different than the one I linked to, and the reason it's different is that for my application I'm using telnet over TCP and the previously linked discussion is using a serial connection.
Tilden
(11 rep)
Oct 15, 2024, 12:42 AM
• Last activity: Oct 28, 2024, 08:12 AM
1
votes
1
answers
6558
views
Why do I get connection refused when I telnet to port 2194?
I'm setting up an OpenVPN access server and I continuously get the error "connection refused" on my client(s).  So I decided to start debugging from the beginning (the server) and tried ``` telnet 127.0.0.1 2194 ``` The result: ``` openvpn_as_test_1:~$ telnet 127.0.0.1 2194 Trying 127...
I'm setting up an OpenVPN access server
and I continuously get the error "connection refused" on my client(s).
So I decided to start debugging from the beginning (the server) and tried
telnet 127.0.0.1 2194
The result:
openvpn_as_test_1:~$ telnet 127.0.0.1 2194
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
So this means the issue is on the server.
So I checked if the port was open in ufw
with sudo ufw status
and noticed the port was not allowed by the firewall.
After adding the port with ufw allow 2194/udp
(and ufw allow 2194/tcp
even when this is needed),
I checked ufw status
again, and this was the result:
Status: active
To Action From
-- ------ ----
2194/udp ALLOW Anywhere
2194/tcp ALLOW Anywhere
22 ALLOW Anywhere
2194/udp (v6) ALLOW Anywhere (v6)
2194/tcp (v6) ALLOW Anywhere (v6)
22 (v6) ALLOW Anywhere (v6)
The port is allowed by the internal firewall,
so I tried telnet 127.0.0.1 2194
again and guess what:
still connection refused
:
openvpn_as_test_1:~$ telnet 127.0.0.1 2194
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
Ok, what else could be the problem?
Maybe telnet does not work properly, so I tried:
openvpn_as_test_1:~$ telnet 127.0.0.1 22
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
Great, telnet is working fine, so…
let's check netstat to see if we listen to port 2194:
openvpn_as_test_1:~$ netstat -al | grep "LISTEN"
tcp 0 0 0.0.0.0:943 0.0.0.0:* LISTEN
tcp 0 0 localhost:domain 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:https 0.0.0.0:* LISTEN
tcp 0 0 localhost:904 0.0.0.0:* LISTEN
tcp 0 0 localhost:905 0.0.0.0:* LISTEN
tcp 0 0 localhost:906 0.0.0.0:* LISTEN
tcp 0 0 localhost:907 0.0.0.0:* LISTEN
tcp 0 0 localhost:908 0.0.0.0:* LISTEN
tcp 0 0 localhost:909 0.0.0.0:* LISTEN
tcp6 0 0 [::]:ssh [::]:* LISTEN
unix 2 [ ACC ] SEQPACKET LISTENING 13660 /run/udev/control
unix 2 [ ACC ] STREAM LISTENING 22260 /run/user/1000/systemd/private
unix 2 [ ACC ] STREAM LISTENING 22264 /run/user/1000/gnupg/S.gpg-agent.ssh
unix 2 [ ACC ] STREAM LISTENING 22265 /run/user/1000/snapd-session-agent.socket
unix 2 [ ACC ] STREAM LISTENING 22266 /run/user/1000/gnupg/S.dirmngr
unix 2 [ ACC ] STREAM LISTENING 22267 /run/user/1000/gnupg/S.gpg-agent.extra
unix 2 [ ACC ] STREAM LISTENING 22268 /run/user/1000/gnupg/S.gpg-agent.browser
unix 2 [ ACC ] STREAM LISTENING 22269 /run/user/1000/gnupg/S.gpg-agent
unix 2 [ ACC ] STREAM LISTENING 13568 /run/systemd/private
unix 2 [ ACC ] STREAM LISTENING 13578 /run/systemd/journal/stdout
unix 2 [ ACC ] STREAM LISTENING 16810 /run/uuidd/request
unix 2 [ ACC ] STREAM LISTENING 16816 /var/run/dbus/system_bus_socket
unix 2 [ ACC ] STREAM LISTENING 16828 /run/acpid.socket
unix 2 [ ACC ] STREAM LISTENING 16830 /run/snapd.socket
unix 2 [ ACC ] STREAM LISTENING 16832 /run/snapd-snap.socket
unix 2 [ ACC ] STREAM LISTENING 13662 /run/lvm/lvmpolld.socket
unix 2 [ ACC ] STREAM LISTENING 13839 /run/lvm/lvmetad.socket
unix 2 [ ACC ] STREAM LISTENING 16861 /var/lib/lxd/unix.socket
unix 2 [ ACC ] STREAM LISTENING 20300 /usr/local/openvpn_as/etc/sock/sagent
unix 2 [ ACC ] STREAM LISTENING 20303 /usr/local/openvpn_as/etc/sock/sagent.localroot
unix 2 [ ACC ] STREAM LISTENING 20304 /usr/local/openvpn_as/etc/sock/sagent.api
unix 2 [ ACC ] STREAM LISTENING 16865 @ISCSIADM_ABSTRACT_NAMESPACE
Port 2194 is not listed here. Ok, now I have no idea how to continue. Where is my issue?
CodeNinja
(231 rep)
May 7, 2020, 02:08 PM
• Last activity: Jun 27, 2024, 05:20 PM
27
votes
8
answers
175249
views
Downloading and uploading files via telnet session
I have an attendance device running `Linux OS`. I can connect this device via telnet session. There are some files in the device that I would like to download and upload with new files. How can I do that? I have very low knowledge on Linux OS. Would you please help! ![enter image description here][1...
I have an attendance device running
Linux OS
. I can connect this device via telnet session. There are some files in the device that I would like to download and upload with new files. How can I do that? I have very low knowledge on Linux OS. Would you please help!

PRdeep Kumawat
(371 rep)
Dec 4, 2014, 12:37 PM
• Last activity: Jun 6, 2024, 06:08 PM
20
votes
4
answers
68680
views
How am I able to telnet to HTTP port 80?
After searching in google I found out that we can `telnet` to web-server to its http port and use `GET` to retrieve a html page. For ex: $ telnet web-server-name 80 But I am not able to understand how is this possible ? I thought that if port 80 is for http server, then port 80 will only listen for...
After searching in google I found out that we can
telnet
to web-server to its http port and use GET
to retrieve a html page.
For ex:
$ telnet web-server-name 80
But I am not able to understand how is this possible ?
I thought that if port 80 is for http server, then port 80 will only listen for http
requests. But how am I able to telnet
to an HTTP
port ?
Aren't telnet
and HTTP
two different protocol ?
sps
(1466 rep)
Oct 30, 2015, 09:09 AM
• Last activity: May 7, 2024, 01:29 PM
1
votes
0
answers
180
views
.telnetrc not being read at startup of telnet
I'm trying to set up some telnet commands in `~/.telnetrc` and they are not being read. The file is ``` DEFAULT mode line ``` When I go into telnet and do a "display", I get ... ``` environ change environment variables ('environ ?' telnet> display will flush output when sending interrupt charac...
I'm trying to set up some telnet commands in
~/.telnetrc
and they are not being read. The file is
DEFAULT
mode line
When I go into telnet and do a "display", I get ...
environ change environment variables ('environ ?'
telnet> display
will flush output when sending interrupt characters.
won't send interrupt characters in urgent mode.
won't read the telnetrc files.
won't map carriage return on output.
will recognize certain control characters.
Transcribed from [this image , which appears to be cropped.]
OS is Ubuntu 18.04.
Is something needed to tell telnet to read the .telnetrc
file at startup?
Larry_C
(111 rep)
Dec 15, 2022, 07:44 PM
• Last activity: Apr 10, 2024, 12:40 AM
0
votes
1
answers
38
views
Why does the network card on a Linux system boot on its own?
When I was using Telnet to remotely access my target computer on Windows and conducting latency testing with `cyclictest`, after several hours of execution, I suddenly found that the `telnet` connection was interrupted: C:\Users\guoya>telnet 192.168.5.1 ... 遗失对主机的连接。(Lost connection to host) At this...
When I was using Telnet to remotely access my target computer on Windows and conducting latency testing with
cyclictest
, after several hours of execution, I suddenly found that the telnet
connection was interrupted:
C:\Users\guoya>telnet 192.168.5.1
...
遗失对主机的连接。(Lost connection to host)
At this time, I saw the following message appearing on my target computer, as if the network card eth2
had been restarted:
[18825.382832] asix 1-6:1.0 eth2: Link is Up - 100Mbps/Full - flow control rx/tx
However, at this time, no one or any other process was operating the target device. Of course, there is no process operating eth2
at this moment.
My target computer is using a system that I compiled kernel 6.4.0 to generate bzImage
and compiled busybox
to generate the root file system,
# taskset -c 2 cyclictest -p 80 -t 1 -n -i 1000 -l 100000000000
/dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 1.36 1.22 1.14 1/127 1617
T: 0 ( 1553) P:80 I:1000 C:11258227 Min: 2 Act: 3 Avg: 3 Max: 21
Vimer
(67 rep)
Feb 4, 2024, 08:44 AM
• Last activity: Feb 4, 2024, 10:05 AM
-3
votes
1
answers
200
views
What is the counterpart of telnet client for servers based on UDP?
Telnet client is said to communicate only with servers which are based on TCP, not with those on UDP. What is the counterpart of telnet client for servers based on UDP?
Telnet client is said to communicate only with servers which are based on TCP, not with those on UDP. What is the counterpart of telnet client for servers based on UDP?
Tim
(106422 rep)
Feb 1, 2024, 08:29 AM
• Last activity: Feb 1, 2024, 09:12 AM
0
votes
1
answers
554
views
Using telnet command without protocol negotiation
I'm using telnet to connect to a serial port via a TCP/IP server. I need a raw, unfiltered, unbuffered connection, and can get most of the way there, but no matter what I do telnet sends protocol negotiation commands when it connects. This is strange, because "man telnet" page says: When connecting...
I'm using telnet to connect to a serial port via a TCP/IP server. I need a raw, unfiltered, unbuffered connection, and can get most of the way there, but no matter what I do telnet sends protocol negotiation commands when it connects.
This is strange, because "man telnet" page says:
When connecting to ports other than the telnet port, telnet does not attempt telnet
protocol negotiations. This makes it possible to connect to services that do not
support the telnet protocol without making a mess.
But, although I'm connecting to a non-standard port, telnet negotiates:
linuxdev:~ griscom$ telnet 172.16.250.49 2023
Trying 172.16.250.49...
Negotiating binary mode with remote host.
Connected to 172.16.250.49.
Escape character is '^]'.
And, as the man page warns, this makes a mess.
Is there a way to use telnet as a completely transparent TCP/IP client? Or, is there some other tool I could use?
Details:
* Running telnet on an Ubuntu 22.04 system
* Server is a [USR-TCP232-T2 ethernet to serial converter](https://www.pusr.com/products/serial-to-ethernet-converter-modules-usr-tcp232-t2.html)
* Serial port is connected to a Linux system's console, so I need unbuffered transparency so I can, e.g. run
vim
or type control characters
Edit: I figured out the problem. telnet
by default runs in "line" mode, collecting characters and sending them the next time a CR is typed. I need it to run in "character" mode, where it sends data as-is.
Problem: I can't set "character" mode without telnet
negotiating that change with the other end of the line. Proof: if I connect to the serial adapter with an unconfigured telnet, I'll get no negotiation characters sent to the adaptor. But, if I use ^]
to drop into command mode, and then type mode character
, telnet
will immediately negotiate with the other end, making a mess. (The same thing happens if I use a .telnetrc
file to configure the connection to character mode.)
So, there's no way for telnet
to connect to a port in "character" model without sending spurious command bytes to that port. I'll need a different solution.
Daniel Griscom
(279 rep)
Jan 18, 2024, 02:11 AM
• Last activity: Jan 19, 2024, 08:06 PM
101
votes
9
answers
261506
views
What are the alternatives for checking open ports, besides telnet?
We can use the following in order to test telnet VIA port; in the following example we test port 6667: [root@kafka03 ~]# telnet kafka02 6667 Trying 103.64.35.86... Connected to kafka02. Escape character is '^]'. ^CConnection closed by foreign host Since on some machines we can't use telnet (for inte...
We can use the following in order to test telnet VIA port; in the following example we test port 6667:
[root@kafka03 ~]# telnet kafka02 6667
Trying 103.64.35.86...
Connected to kafka02.
Escape character is '^]'.
^CConnection closed by foreign host
Since on some machines we can't use telnet (for internal reasons) what are the alternatives to check ports, as telnet?
yael
(13936 rep)
Nov 4, 2018, 10:25 AM
• Last activity: Dec 26, 2023, 06:06 PM
0
votes
1
answers
105
views
Are e-mails to localhost logged with sSMTP?
I don't suppose that sSMTP will work for just sending mail on the localhost? nicholas@mordor:~$ nicholas@mordor:~$ sudo cat /etc/ssmtp/ssmtp.conf # # Config file for sSMTP sendmail # # The person who gets all mail for userids < 1000 # Make this empty to disable rewriting. root=postmaster # The place...
I don't suppose that sSMTP will work for just sending mail on the localhost?
nicholas@mordor:~$
nicholas@mordor:~$ sudo cat /etc/ssmtp/ssmtp.conf
#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=postmaster
# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=mail
# Where will the mail seem to come from?
#rewriteDomain=
# The full hostname
hostname=mordor.saundersconsulting.tech
# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
#FromLineOverride=YES
nicholas@mordor:~$
nicholas@mordor:~$ sudo cat /etc/ssmtp/revaliases
# sSMTP aliases
#
# Format: local_account:outgoing_address:mailhub
#
# Example: root:your_login@your.domain:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.
nicholas@mordor:~$
nicholas@mordor:~$ swaks --to root@mordor.saundersconsulting.tech --from nicholas@mordor.saundersconsulting.tech --server mordor.saundersconsulting.tech
=== Trying mordor.saundersconsulting.tech:25...
*** Error connecting to mordor.saundersconsulting.tech:25:
*** IO::Socket::INET6: connect: Connection refused
nicholas@mordor:~$
nicholas@mordor:~$ hostname
mordor.saundersconsulting.tech
nicholas@mordor:~$
nicholas@mordor:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 23.10
Release: 23.10
Codename: mantic
nicholas@mordor:~$
There's no mention of anything except for gmail in mail.log and mail.err which were attempted previously. To my understanding sSMTP only will relay e-mail.
notable result:
nicholas@mordor:~$
nicholas@mordor:~$ ssmtp nicholas@mordor.saundersconsulting.tech
subject:ping
ssmtp: Cannot open mail:25
nicholas@mordor:~$
that sSMTP cannot open port 25?
Nicholas Saunders
(565 rep)
Dec 19, 2023, 01:33 PM
• Last activity: Dec 19, 2023, 02:10 PM
0
votes
4
answers
929
views
Is it "telnet:" or the port 4161 that is telling me that I'm connecting to an UDP server?
I am asking this question because I am not meeting UDP and telnet often... To prepare myself for a development, I am reading a documentation where I will have to connect to a `telnet://x.y.z:4161` url. I know, because one at work told me, that it's an UDP server that is behind, but what if I didn't...
I am asking this question because I am not meeting UDP and telnet often...
To prepare myself for a development, I am reading a documentation where I will have to connect to a
telnet://x.y.z:4161
url.
I know, because one at work told me, that it's an UDP server that is behind,
but what if I didn't know that, would tell me this?
the 4161
port, that is dedicated for UDP exchanges, I think.
But could it be also the telnet://
protocol mention that carries this information?
What does the telnet:
protocol means here?
"_I don't know exactly the kind of network communication I have here_"?
Marc Le Bihan
(2353 rep)
Nov 8, 2023, 11:12 AM
• Last activity: Nov 8, 2023, 01:44 PM
3
votes
1
answers
1762
views
Function key mappings in telnet session to Universe Application
Our client uses Termtek terminals to connect to their Universe platform. More terminals needed and we can't get any. The alternative is to get winboxes and run wintegrate or try and get a Linux terminal working. Configured xterm with keybindings that I need for the F1 - F5 keys. In `xterm` session t...
Our client uses Termtek terminals to connect to their Universe platform. More terminals needed and we can't get any. The alternative is to get winboxes and run wintegrate or try and get a Linux terminal working. Configured xterm with keybindings that I need for the F1-F5 keys. In
xterm
session these bindings work, however when I connect via telnet to the Universe sessions, they don't. For F1 I get ^[OP. I need EX and return. F2 I need + and return and so forth. I have been trawling the net with not much luck. Indications are it's to to do with the terminal settings rather than on the host side however I can't seem to find anything concrete. I found that the the backspace button did not work(even though worked in terminal session) and used a script I found on this forum to run with the telnet command. This tends to suggest that the terminal keyboard mappings need to change for Telnet sessions.
The supplier has set up the universe platform for us to test but only have 10 days before it expires. Hope I can get some help before then
Majikins
(31 rep)
Mar 12, 2014, 06:25 PM
• Last activity: Nov 3, 2023, 04:04 PM
12
votes
4
answers
25122
views
Openssl command s_client always says 400 Bad Request
I am trying to test a server that is working normal in web browser, with openssl s_client option, connecting it directly using openssl returns the 400 Bad Request: openssl s_client -servername example.com -connect example.com:443 -tls1 (some information about the certificate) GET / HTTP/1.1 (and the...
I am trying to test a server that is working normal in web browser, with openssl s_client option, connecting it directly using openssl returns the 400 Bad Request:
openssl s_client -servername example.com -connect example.com:443 -tls1
(some information about the certificate)
GET / HTTP/1.1
(and the error occurs **immediately** - no time to include more headers like Host:)
Important: I already tried to put the Host: header, the thing is that when i run GET, the error occur immediately leaving me no chance to include more headers. Replace example.com with my host...
Luciano Andress Martini
(6926 rep)
Jun 13, 2017, 06:21 PM
• Last activity: Oct 9, 2023, 07:34 PM
Showing page 1 of 20 total questions