1, first of all ensure that your network is well-equipped to spell through Ubuntu, and then check the SSH service situation.
Ubuntu does not have the default SSH service installed, if you link ubuntu via SSH, you need to manually install Ssh-server.
To determine if the SSH service is installed:
1 can be done by the following command: [email protected]:~$ ssh localhost
Ssh:connect to host localhost port 22:connection refused//is shown, indicating that no installation has yet been
2 Check if the SSH server package is installed when the system is installed: [email protected]:~ $rpm-qa|grep openssh//If openssh-server-* is included in the display results, it is installed, direct-start 2, install SSH through apt installation, the command is as follows: [email protected]:~$ sudo apt-get install openssh-server sshd service will be available (service sshd start). (where * The content is the version of the package, generally 3.5p1-6)
If there is no display, or the display does not contain openssh-server-*, then the SSH Server software is not installed if the APT command does not: there is a problem with the package have no installation candidate, such as:
# apt-get Install <packagename>
Reading Package Lists ... Done
Building Dependency Tree ... Done
Package aptitude are not available, but are referred to by the another package.
This may mean and the package are missing, has been obsoleted, or
is only available from another source
e:package <packagename> has no installation candidate
here's how to fix it:
# Apt-get Update
# Apt-get Upgrade
# Apt-get Install <packagename>
So you can use apt-get normally.
Add a third-party address:
sudo add-apt-repository "Deb http://archive.canonical.com/lucid partner"
sudo apt-get update
3, start the SSH service: [email protected]:~$ sudo/etc/init.d/ssh Start, you can check the following command to see if the service started correctly [email protected]:~$ ps-e|grep SSH 62 12? 00:00:00 sshd As above indicates boot OK. Note that the default SSH port is 22, you can change the port, stop before changing, and then start. The configuration is configured under/etc/ssh/sshd_config, as shown below.
[email protected]:~$ vi/etc/ssh/sshd_configFinally, you should be able to putty the connection successfully. (Use Ifconfig to see your Ubuntu IP address).Linux daily Small problem recordFirst, after modifying the hostname, when executing the sudo command,
Will prompt sudo: unable to resolve host. Search on the Internet, found a solution:
$ sudo vim/etc/hosts
Locate the following line: 127.0.1.1 XXX modified to: 127.0.1.1 (modified host name)
Linux Handy Record