No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

FAQ-How to Enable the SSH and SFTP Functions on Solaris 10

Publication Date:  2012-07-25 Views:  42 Downloads:  0
Issue Description
Q:
How to use SFTP to transfer files to the server after logging in to the server through the SSH on the N2000 BMS client? 
 
Alarm Information
Null
Handling Process
A:
By default, Solaris 10 supports the SSH startup and configuration functions. You need to modify related items of the /etc/ssh/sshd_config configuration file and use the ssh-keygen file on the SSH to generate a key. After restarting the SSHD service, you can log in to the SSH and use SFTP to transfer files if you pass the password authentication.
1. To check whether the SSH and the SFTP services are running, run the following command:
#ps -ef | grep sshd
If a process ID is displayed, it indicates that the process is running.
2. Modify the following items in the /etc/ssh/sshd_config file:
PermitRootLogin yes //allows users to log in to the SSH as user root
PasswordAuthentication yes //uses the password authentication mode
3. To restart the SSH service of the server, run the following command:
# ps -ef |grep sshd
The following message is displayed:
root- 9280---- 1- 0-- Aug 08 ?------- 0:01 /usr/local/sbin/sshd
root 11179 10028- 0 17:31:02 pts/8--- 0:00 grep sshd
To kill the process, run the following command:
#kill -9 9280
To query the process again, run the following command:
# ps -ef |grep sshd
The following message is displayed:
root- 4557---- 1- 0-- Aug 08 ?------- 0:01 /usr/local/sbin/sshd
root 10004 14442- 0 17:31:02 pts/8--- 0:00 grep sshd
The process ID is different from the previous one. It indicates that the process is restarted.
4. You can use the SSH to log in to the server as user root on the client. 
 
Root Cause
Null
Suggestions
By default, the SSH service is enabled. To disable the SSH service, run the svcadm disable svc:/network/ssh:default command.
If the SSH service is disabled, run the svcadm enable svc:/network/ssh:default command to enable it.
If the SSH service is enabled, then the SFTP service is enabled by default. To modify the /etc/ssh/sshd_config file to disable the SFTP service, do as follows:
Delete the Subsystem sftp /usr/lib/ssh/sftp-server line, save the file, and then exit.
Then run the svcadm refresh svc:/network/ssh:default command.
If the SSH service is enabled, but the SFTP service is disabled, you need to enable the SFTP service. To enable the SFTP service, do as follows:
Add the Subsystem sftp /usr/lib/ssh/sftp-server line to the /etc/ssh/sshd_config file, save the file, and then exit.
Then run the svcadm refresh svc:/network/ssh:default command. 
 

END