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.