User Tools

Site Tools


linux:ssh

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux:ssh [10/11/2023 17:06] – created - external edit 127.0.0.1linux:ssh [30/12/2024 12:46] (current) – [Interfaces] andrew
Line 14: Line 14:
 I was caught out trying to set up a linux router with multiple interfaces. I was unable to ssh to it from any os or client, but pings and ntp worked fine. It seems that for a host with multiple interfaces, you have to specify the addresses you want sshd to listen to explicitly. However subsequently I have not had this problem on other systems, but it can be used to advantage if you have a multihomed system and you only want to bind sshd to one address. I was caught out trying to set up a linux router with multiple interfaces. I was unable to ssh to it from any os or client, but pings and ntp worked fine. It seems that for a host with multiple interfaces, you have to specify the addresses you want sshd to listen to explicitly. However subsequently I have not had this problem on other systems, but it can be used to advantage if you have a multihomed system and you only want to bind sshd to one address.
  
-Port 22 + 
-ListenAddress 192.168.1.1 +  Port 22 
-ListenAddress 192.168.2.1 +  ListenAddress 192.168.1.1 
-#ListenAddress :: +  ListenAddress 192.168.2.1 
-+  #ListenAddress ::  <- listen on all ipv6 interfaces 
-.+  
 +  .
  
 ==== Default Protocol ==== ==== Default Protocol ====
Line 86: Line 87:
  
  
 +===== IP address range control =====
 + 
 +
 +[[https://serverfault.com/questions/406839/only-allow-password-authentication-to-ssh-server-from-internal-network]]
 ===== Hijacking an ssh session ===== ===== Hijacking an ssh session =====
  
-Suppoer you are logged in to ''local'' with an ssh session to ''remote'' and that root is also logged in to ''remote''+Suppose you are logged in to ''local'' with an ssh session to ''remote'' and that root is also logged in to ''remote''
  
 root can  see from ''netstat -tn'' what the DISPLAY is that ''local'' is using on ''remote'', probably 6000 or higher and you subtract 6000 to get the X display number. root can  see from ''netstat -tn'' what the DISPLAY is that ''local'' is using on ''remote'', probably 6000 or higher and you subtract 6000 to get the X display number.
linux/ssh.1699635994.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki