Ssh configuration connection and ssh Configuration

Source: Internet
Author: User

Ssh configuration connection and ssh Configuration

SSH Configuration:

1. Modify vi/etc/ssh/sshd_config, and delete and modify the parameter values according to the parameter annotations to be modified in the template:

Port 22 specifies the Port number of the SSH connection. We do not recommend that you use the default Port 22 for security.

Protocol allows connection between SSH1 and SSH2. We recommend that you set this parameter to Protocal 2.

Other parameters are adjusted as needed. For the configuration method, see man ssh_config.

2. Modify hosts. deny and add a line at the end:

Sshd: All

3. Modify hosts. allow to add a line at the end:

Sshd: All

If you want to install an IP address that can restrict access, set it as follows:

Sshd: 192.168.0.101

Sshd: 192.168.0.102

The above configuration indicates that only 101 and 102 servers are allowed for SSH connection.

4. Start SSH

/Etc/init. d/sshd start

 

Now SSH can be connected.


Ssh framework Database Configuration connection

In the applicationContext. xml file,

<Beans xmlns = "www.springframework.org/schema/beans"
Xmlns: xsi = "www.w3.org/2001/XMLSchema-instance"
Xmlns: tx = "www.springframework.org/schema/tx"
Xmlns: aop = "www.springframework.org/schema/aop"
Xmlns: compass = "www.compass-project.org/schema/spring-core-config"
Xsi: schemaLocation = "www.springframework.org/schema/beans www.springframework.org/schema/beans/spring-beans-2.0.xsd
Www.springframework.org/schema/tx ...... the remaining full text>

Database Connection configuration in SSH Programming

<Bean id = "dataSource" class = "org. springframework. jndi. JndiObjectFactoryBean" destroy-method = "close">
<Property name = "driverClass" value = "com. mysql. jdbc. Driver"/>
<Property name = "jdbcUrl" value = "jdbc: mysql: // localhost: 3306/myweb"/>
<Property name = "user" value = "root"/>
<Property name = "password" value = "zjl"/>
<Property name = "maxPoolSize" value = "50"/>
<Property name = "minPoolSize" value = "1"/>
<Property name = "initialPoolSize" value = "10"/>
<Property name = "maxIdleTime" value = "20"/>
</Bean>

Change org. springframework. jndi. JndiObjectFactoryBean to org. springframework. jndi. JndiObjectFactoryBean.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.