Linked Questions

1 vote
2 answers
9k views

I need check port on the remote server in bash script before script will continue. I search here and on the internet, but I can´t find answer which works for me. I´m using RHEL 7.2 virtual machine so ...
Rohlik's user avatar
  • 1,327
0 votes
1 answer
2k views

I have a file with 10 servers (one per line) and I need to check from time to time if telnet on port 1231 is opened. How can I do that using a bash script? I tried to find a similar topic related to ...
VGM's user avatar
  • 69
0 votes
1 answer
1k views

I am creating one bash script which can automate the process of checking the connectivity between two unix hosts. Need to check whether specific port is open from one host to other. hosts don't have ...
Rahul's user avatar
  • 1
0 votes
1 answer
278 views

I currently searching for a code/script that will allow it to check if a specific port is open, let's say 123. Found a public script on a ftp but I don't know how and what to modify in it to suit my ...
Cristian-Dumitru Popescu's user avatar
0 votes
0 answers
77 views

I would like to test in a script [Linux: CentOS 7] the availability of a remote machine. While TCP packages can blocked by a firewall on the way, ICMP packages may be possible and are not blocked by ...
THX's user avatar
  • 593
214 votes
14 answers
458k views

From a bash script how can I quickly find out whether a port 445 is open/listening on a server. I have tried a couple of options, but I want something quick: 1. lsof -i :445 (Takes seconds) 2. ...
Aman Jain's user avatar
  • 11.4k
9 votes
4 answers
12k views

In command below I enable file /dev/tcp/10.10.10.1/80 both for reading and writing and associate it with file descriptor 3: $ time exec 3<>/dev/tcp/10.10.10.1/80 bash: connect: Operation timed ...
Martin's user avatar
  • 1,229
4 votes
2 answers
20k views

I am using nc command in my Linux box like below to check if a port is listening; This displays success message: nc -z 192.168.0.2 9000 This displays 0: echo $? I have combined it in a shell script ...
Alfred's user avatar
  • 21.5k
1 vote
2 answers
8k views

I have a bash program that checks that a daemon in a given port is working: nc -z localhost $port > /dev/null if [ "$?" != "0" ] then echo The server on port $port is not working exit fi This ...
fgalan's user avatar
  • 12.4k
1 vote
2 answers
4k views

I want to check if a port is being used or not. I've used the command: netstat -an | grep <port_no> | grep -i listen. When I compare its output by running, if(message_port_check.equals(null)), ...
Pravar 's user avatar
0 votes
1 answer
6k views

I've had frustrating issues with a computer whose network drops at apparently random times and as a work-around I made a simple cron job to restart it every hour. But this seems silly if the network ...
user1149499's user avatar
3 votes
1 answer
3k views

I am setting up prometheus/node_exporter on AWS EC2. With the following configuration [Unit] Description=Node Exporter Wants=network-online.target After=network-online.target [Service] User=...
Set Kyar Wa Lar's user avatar
0 votes
1 answer
4k views

I need to check my connection to a spesific port every 5 minutes, currently i can't use ping command, so i need other alternative to do this.I want to execute this command in shell script Can someone ...
Ahmad asy'ary's user avatar
0 votes
2 answers
1k views

I would like to check if I can connect to a port or not from within a bash script Based on the answer to a similar question I tried running nc -zvw10 <host> <port> and check if the status ...
user2175783's user avatar
  • 1,496
0 votes
2 answers
686 views

while i installed Kanban and Redis on my Server, which OS is CentOS 7, i get some issue, which i can't make out. This is what i want to do: i want to have three docker containers -> gitlab -> redis -> ...
Mira Mira's user avatar
  • 1,595

15 30 50 per page