Use secureCRT to log on to the Ubuntu system of the VM.

Source: Internet
Author: User
Some days ago, my secureCRT was unable to connect to ubuntu on the virtual machine, even though the IP addresses on both sides could be pinged! I also made some suggestions, ......, Not solved yet! (It's all strange that I was so blind when I didn't even install ssh !) But I still want to thank them for their help. I later found a method on Baidu and shared it with you. Author: chepwavege (CSDN Network)

Some days ago, my secureCRT was unable to connect to ubuntu on the virtual machine, even though the IP addresses on both sides could be pinged! I also made some suggestions, ......, Not solved yet! (It's all strange that I was so blind when I didn't even install ssh !) But I still want to thank them for their help. I later found a method on Baidu and shared it with you.

Author: chepwavege (CSDN network name)

How to use SecureCRT to connect to ubuntu. the remote host has no response, garbled code, or firewall errors .. And so on

Category: c/c ++ arm9-2012-03-15

How to use SecureCRT to connect to ubuntu

When you use secureCRT to connect to Ubuntu, remote access is denied .. After a thorough research, I realized that there is no ssh on Ubuntu ..

This is the connection process.

1. what is ssh first?

We can regard ssh as an enhanced version of telnet. the password and information of telnet are not encrypted, while ssh is encrypted.

.

2. enable the ssh function on ubuntu

Install the SDK first and then enable it automatically.

Sudo apt-get install openssh-server openssh-client

.

3. install secureCRT

.

4. view the ubuntu ip address

Ifconfig (note: ifconfig, not ipconfig on windows)

.

5. connection

SecureCRT => Quick Connect, Connect to ubuntu, enter the ubuntu id and pwd

. (If the connection fails, it may be that the ssh service on Ubuntu is not enabled.

. Start ssh-server.

$/Etc/init. d/ssh restart

Confirm that the ssh-server is working properly.

$ Netstat-tlp

Tcp6 0 0 *: ssh *: * LISTEN-

The above output indicates that the ssh-server is already running.

In addition, log on to the server through ssh on the client. Assume that the IP address of the server is 192.168.0.103, and the logon username is hyx.

$ Ssh-l hyx 192.168.0.103

)

6. solutions to Chinese character garbled characters

After successful connection, we found that secureCRT had garbled characters on Chinese characters. Google, it seems that the default ssh encoding of ubuntu 2.6kernel is utf8, while the default display encoding of secureCRT does not seem to be utf8, then, you only need to change the display encoding of secureCRT to utf8 to display it correctly. In secureCRT, select option-> sessionoption-> apperance to change the character encoding to utf8.

7. the system prompts that there is no firewall corresponding to "none" in the database, which may be a problem of Chinese Cracking. create a firewall named none in option. OK ..

Apt-get install vsftpd

System environment:

Ubuntu 10.04LTS desktop and Ubuntu 10.04LTS server

? Pure Sulton? Marsh?] Yes ??

Netstat-tul | grep ftp

If yes? | Run west? Why? Chi Sun

Summary:

1. anonymous download

$ Sudo apt-get install vsftpd

$ Sudo apt-get install vsftpd

After vsftp is installed, an ftp user group and a user named ftp are automatically created. The main directory of the user is/srv/ftp. The owner of this directory is the user ftp, and ftp has the rwx permission on this directory

In this case, you only need to add anonymous_enable = YES to/etc/vsftpd. conf. other configurations keep the default Ubuntu value and execute

$ Sudo/etc/init. d/vsftpd restart

$ Sudo/etc/init. d/vsftpd restart

Restart the vsftp service to access ftp anonymously and download files.

If other configuration information is changed, make sure that the configuration is correct (for example, after setting the log file path, make sure there is a log file in the corresponding directory, otherwise, you must manually create an empty file.) the file cannot conflict with anonymous_enable = YES.

After an afternoon of hard work, we found that the four bold points were the key to setting up anonymous downloads.

2. logs

Default vsftp logs are stored in/var/log/vsftpd. log.

3. add a user

To add an ftp user, follow these steps:

For example, add a user named upload whose main directory is/srv/ftp/upload. the default shell is sh, which belongs to the ftp user group and needs to be executed:

$ Sudo useradd-d/srv/ftp/upload-s bin/sh-g ftp upload

$ Sudo useradd-d/srv/ftp/upload-s bin/sh-g ftpupload add a line to the vsftp configuration file

Unpriv_user = upload)

And one line

Local_enable = YES

Ensure that the upload user is the owner of the main directory:

$ Sudo usermod-d/srv/ftp/upload

$ Sudo usermod-d/srv/ftp/upload upload4, umask

The default umask value of vsftp is 077, which means that the file uploaded by one user cannot be downloaded by other users. if you want to change the umask value, you can add a line to the vsftp configuration file.

Local_umask = [umask to be set]

5. Mount

If another disk volume or virtual volume group is attached to a directory in the ftp directory (I mount the pub directory to a virtual volume Group, in this way, you can dynamically increase space, strip, and redundancy). pay attention to setting automatic mounting upon startup. Otherwise, the default ubuntuserver will unmount the mount point when it is shut down, next boot, pub will have an empty directory.

At the same time, do not mount the root directory of the ftp user. after being mounted, the owner of the directory becomes root and cannot be changed.

6. copy an object

Copy all files and subdirectories in a directory and run the following command:

$ Cp-a [directory name]/* [destination directory]

$ Cp-a [directory name]/* [Target Directory] during aix training, the instructor said that cp and rm are more efficient than mv, but I don't feel it when I move more than 30 GB of files on ubuntu. maybe the files I copied are incomplete .. However, as long as the disk space is sufficient, cp is more practical.

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.