mirror of https://github.com/jumpserver/jumpserver
				
				
				
			fix: 修改connection token 对接client的username
							parent
							
								
									314b63cec8
								
							
						
					
					
						commit
						a0df39ad28
					
				| 
						 | 
				
			
			@ -131,10 +131,11 @@ class NativeClient(TextChoices):
 | 
			
		|||
 | 
			
		||||
    @classmethod
 | 
			
		||||
    def get_launch_command(cls, name, token, endpoint, os='windows'):
 | 
			
		||||
        username = f'JMS-{token.id}'
 | 
			
		||||
        commands = {
 | 
			
		||||
            cls.ssh: f'ssh {token.id}@{endpoint.host} -p {endpoint.ssh_port}',
 | 
			
		||||
            cls.putty: f'putty.exe -ssh {token.id}@{endpoint.host} -P {endpoint.ssh_port}',
 | 
			
		||||
            cls.xshell: f'xshell.exe -url ssh://{token.id}:{token.value}@{endpoint.host}:{endpoint.ssh_port}',
 | 
			
		||||
            cls.ssh: f'ssh {username}@{endpoint.host} -p {endpoint.ssh_port}',
 | 
			
		||||
            cls.putty: f'putty.exe -ssh {username}@{endpoint.host} -P {endpoint.ssh_port}',
 | 
			
		||||
            cls.xshell: f'xshell.exe -url ssh://{username}:{token.value}@{endpoint.host}:{endpoint.ssh_port}',
 | 
			
		||||
            # cls.mysql: 'mysql -h {hostname} -P {port} -u {username} -p',
 | 
			
		||||
            # cls.psql: {
 | 
			
		||||
            #     'default': 'psql -h {hostname} -p {port} -U {username} -W',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue