Current location - Quotes Website - Collection of slogans - Linux view ssh port
Linux view ssh port
How to use ssh to remotely log in to the host to execute shell scripts under linux?

The linux host logs into another linux server, and directly inputs: ssh account @IP address at the command prompt, for example: ssh Oracle @192.168.10.13, and then inputs the password according to the prompt. If everything is all right, enter the remote host.

Is ssh service on linux server normal through script?

Effect:

Ping.sh code:

#ssh connection server

functiongetConnection()

{

ssh-onumberofpassword prompts = 0 $ 1 @ $ 2 " pwd " >/dev/null

If; then

Echo-e"n cannot connect to $2 "

continue

other

Echo-e"n successfully connected to $2 "

The ship does not bear the loading fee.

}

# Here, you can configure the automatic loop by reading the file and modify it if necessary.

getconnectionroot 192. 168. 1. 1

You can also put IP in the host for automatic cycle ~

How to view linux open ssh port?

See linux open ssh port specific steps are as follows:

1. First check whether the SSH package has been installed in linux, and use rpm-QA | grepsash.

2. Confirm that the ssh service has been started. Take centos system as an example.

3. The path to find the SSh service configuration file is usually the file sshd_config in the /etc/ssh directory. Note: SSH port defaults to 22. If you want to modify, edit port 22 directly. Please note that the preceding "#" should be deleted, then saved and restarted.

What if there is no ssh service under linux?

There is generally ssh service under linux. If not, you can use yuminstallssh for online installation.

There is no. ssh directory under the Linux root directory?

#sshlocalhost Enter the above command, and then enter the password generation according to the prompt yes. Ssh records your password information, and there is no. SSH folder without logging in to root.