Ubuntu does not have the ssh service installed by default. You can run the following command:
[email protected]:~ $ssh localhost ssh:connect to host localhost port 22:connection refused
As shown above, it means that ssh has not been installed.
Install via apt-get as follows:
[email protected]:~ $sudo apt-get install openssh-server
The default port of ssh is 22. You can modify the default port by sudo /etc/init.d/ssh start.
scp logs in based on ssh, so file copying cannot be performed without ssh installed.
The use of scp is quoted from ():
There are three common methods for copying files between different linuxs. The first is ftp, which is one of which installs ftpserver, so that another one can use ftp client program to copy files. The second method is to use samba service, similar to the operation of the windows file copy,More concise and convenient,The third is to use the scp command to copy files.
scp is a file copy with security and login based on ssh. It is more convenient to operate,For example, to copy the current file to another remote host,Can be ordered as follows.
scp /home/daisy/full.tar.gz [email protected]:/home/root
Then you will be prompted to enter the login password of the root user of the other 172.19.2.75 host,Then started copying.
If i want to do the reverse,Copy files from the remote host to the current system,It's also very simple.
scp [email protected]:/home/root /home/daisy/full.tar.gz
- Novice Linux command: ssh command (remote login)
- Detailed sshd service and service management commands under Linux
- expect command to achieve batch ssh password-free under linux
- Use ssh to remotely execute commands in linux to batch export databases to local
- Example of running Linux command in PHP and starting SSH service
- Detailed 7 SSH command usage you don't know under Linux
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- python 3x - typeerror: 'method' object is not subscriptable
- i want to call a child component method from a parent in vuejs
- xcode - pod install [!] no `podfile 'found in the project directory
- sh - 'apt-get' is not recognized as an internal or external command, operable program or batch file