Bonjour,
Je développe une application en java exécutant du code à distance. Le protocole utilisé est SSH et la librairie java utilisé est SSHtools.
Je souhaiterais exécuter le fichier .profile pour récupérer les variables d'environnement d'utilisateurs (car il ne s'exécute pas par défaut au démarrage de la session).
Lorsque je l'exécute sur une machine, cela ne pose pas de problème, mais lorsque j'essaye sur une autre j'obtiens le message d'erreur Not a terminal. Je pense donc que ça vient de la configuration du serveur SSH mais je ne vois pas l'option qui pourrait résoudre ce problème.
Voici le fichier de configuration sshd_conf
Est ce que le problème vient bien de ce fichier ou est autre chose qui pose problème?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119 # $OpenBSD: sshd_config,v 1.59 2002/09/25 11:17:16 markus Exp $ # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin:/system/product s/openssh/bin # The strategy used for options in the default sshd_config shipped with # OpenSSH is to specify options with their default value where # possible, but leave them commented. Uncommented options change a # default value. Port 22 Protocol 2 #ListenAddress 0.0.0.0 #ListenAddress :: # HostKey for protocol version 1 #HostKey /system/products/openssh/conf/ssh_host_key # HostKeys for protocol version 2 HostKey /system/products/openssh/conf/ssh_host_rsa_key HostKey /system/products/openssh/conf/ssh_host_dsa_key # Lifetime and size of ephemeral version 1 server key #KeyRegenerationInterval 3600 #ServerKeyBits 768 # Logging #obsoletes QuietMode and FascistLogging #SyslogFacility AUTH LogLevel INFO # Authentication: LoginGraceTime 60 PermitRootLogin no StrictModes yes #RSAAuthentication yes PubkeyAuthentication yes #AuthorizedKeysFile .ssh/authorized_keys # rhosts authentication should not be used (Deprecated option) #RhostsAuthentication no # Don't read the user's ~/.rhosts and ~/.shosts files ...skipping... # Lifetime and size of ephemeral version 1 server key #KeyRegenerationInterval 3600 #ServerKeyBits 768 # Logging #obsoletes QuietMode and FascistLogging #SyslogFacility AUTH LogLevel INFO # Authentication: LoginGraceTime 60 PermitRootLogin no StrictModes yes #RSAAuthentication yes PubkeyAuthentication yes #AuthorizedKeysFile .ssh/authorized_keys # rhosts authentication should not be used (Deprecated option) #RhostsAuthentication no # Don't read the user's ~/.rhosts and ~/.shosts files IgnoreRhosts yes # For this to work you will also need host keys in /system/products/openssh/conf/ssh_known_hosts RhostsRSAAuthentication no # similar for protocol version 2 #HostbasedAuthentication no # Change to yes if you don't trust ~/.ssh/known_hosts for # RhostsRSAAuthentication and HostbasedAuthentication IgnoreUserKnownHosts yes # To disable tunneled clear text passwords, change to no here! PasswordAuthentication yes #PermitEmptyPasswords no # Change to no to disable s/key passwords #ChallengeResponseAuthentication yes # Kerberos options #KerberosAuthentication no #KerberosOrLocalPasswd yes #KerberosTicketCleanup yes #AFSTokenPassing no # Kerberos TGT Passing only works with the AFS kaserver #KerberosTgtPassing no # Set this to 'yes' to enable PAM keyboard-interactive authentication # Warning: enabling this may bypass the setting of 'PasswordAuthentication' #PAMAuthenticationViaKbdInt no X11Forwarding yes #X11DisplayOffset 10 #X11UseLocalhost yes PrintMotd no PrintLastLog yes KeepAlive yes #UseLogin no #UsePrivilegeSeparation yes #PermitUserEnvironment no Compression no #MaxStartups 10 # no default banner path Banner /system/products/openssh/conf/banner.txt #VerifyReverseMapping no # override default of no subsystems Subsystem sftp /system/products/openssh/libexec/sftp-server
Merci pour vos réponses
Partager