Location>code7788 >text

Happy 4th of July! Attach ssh live

Popularity:367 ℃/2024-10-03 16:32:47

Guys, it's been a while since I've updated, I'm currently interning at the Software Institute of the Chinese Academy of Sciences, and I'd like to wish you all a happy National Day!

Today's installment brings a hands-on tutorial on the ssh command. ssh is encountered a lot in the workplace because it always requires logging on to the server, and there are quite a few ways to play with it, and these are a few of the ways I commonly play with it.

1. Windows connects directly to Linux booted from a virtual machine.

ssh user@IPV4

2. Reverse connection from Linux to Windows.

The command is the same as above, except that you need to go to cmd and type ipconfig to check the current IP under Windows, and you also need to go to Windows applications to add optional features, find the SSH-related and add, and finally open the service with PowerShell.

3、Why can't I start the firewall (ufw) when it's set up under Linux?

That's because you didn't add the extra rule that makes the firewall allow ssh traffic through, try it if you don't believe me 😋.

4. Jumpstart machine login (a new Linux operating system booted with Qemu under Linux, with a Windows connection running on top of Qemu)

ssh -J JumpPos@JumpPosIP target@targetIP

-J is used to specify the username as well as the IP of the intermediate springboard, and target is the target machine that needs to be logged in. In practice, you generally can not log in directly to the server, you need the company to add server privileges to you, and then connect directly or through the springboard machine connection.

 

Well, these are the four more common ways to take advantage of the National Day to hurry up and practice~