From: <har...@da...> - 2004-01-13 23:22:26
|
Hi Pramod, Do you have a sample file which does this? I think log4j packe is not included along with j2ssh package. Please advice, Thanks, Haris. > It doesn't depends on the JDK. The log4j should be configured to do that. > Of > course there are other loggin tools, but Apache's log4j is one of such > very > good tools. > Apache's site http://logging.apache.org/log4j/docs/api/index.html is a > very > good site to start with, to learn how to configure the log4j to files, > console, db, syslog, etc. > > pramodh. > ----- Original Message ----- > From: <har...@da...> > To: "Pramodh Peddi Hi" <pe...@co...> > Cc: <har...@da...>; "Manfred Bergmann" > <man...@ep...>; > <ura...@mi...>; <ssh...@li...> > Sent: Tuesday, January 13, 2004 4:06 PM > Subject: Re: [Sshtools-users] java sftp client > > >> Hi, >> If I use JDK 1.4, I could log the console values into a a file. >> How do I do this on JDK 1.3? >> >> -hp >> >> > You have to configure the log4j descriptor file to avoid apitting of >> log >> > stmts coming from this package. If you use log4j.xml, It should be >> > something >> > like: >> > >> > <category name="com.sshtools.j2ssh"> >> > <priority value="WARN"/> >> > <appender-ref ref="CONSOLE"/> >> > <appender-ref ref="ICFILE"/> >> > </category> >> > >> > Abovem CONSOLE and ICFILE are console and file appenders respectively. >> > >> > If you use log4j.properties, there should be an entry like: >> > log4j.logger.com.sshtools.j2ssh = WARN >> > >> > Hope this helps! >> > >> > Pramodh. >> > >> > ----- Original Message ----- >> > From: <har...@da...> >> > To: "Manfred Bergmann" >> > <man...@ep...> >> > Cc: <ura...@mi...>; <ssh...@li...>; >> > <har...@da...> >> > Sent: Monday, January 12, 2004 6:55 PM >> > Subject: Re: [Sshtools-users] java sftp client >> > >> > >> >> Hi, >> >> >> >> I am getting too many log messges when I am trying to use SftpConnect >> > Class. >> >> How can I switch my log off? >> >> >> >> -hp >> >> >> >> eg: >> >> >> >> D:\j2ssh-0.2.7\examples>java SftpConnect >> >> Connect to host? Jan 12, 2004 6:31:29 PM >> >> com.sshtools.j2ssh.transport.publickey.SshKeyPairFactory <c >> >> linit> >> >> INFO: Loading public key algorithms >> >> Jan 12, 2004 6:31:35 PM >> >> com.sshtools.j2ssh.configuration.ConfigurationLoader initialize >> >> INFO: JAVA version is 1.4.0_03 >> >> Jan 12, 2004 6:31:35 PM >> >> com.sshtools.j2ssh.configuration.ConfigurationLoader initialize >> >> INFO: Extension C:\Program Files\Java\j2re1.4.0_03\lib\ext\dnsns.jar >> >> being >> >> added to classpath >> >> Jan 12, 2004 6:31:35 PM com.sshtools.j2ssh.util.ExtensionClassLoader > add >> >> INFO: Adding C:\Program Files\Java\j2re1.4.0_03\lib\ext\dnsns.jar to > the >> >> extension classpath >> >> Jan 12, 2004 6:31:35 PM >> >> com.sshtools.j2ssh.configuration.ConfigurationLoader initialize >> >> INFO: Extension C:\Program >> Files\Java\j2re1.4.0_03\lib\ext\ldapsec.jar >> >> being added to classpath >> >> Jan 12, 2004 6:31:35 PM com.sshtools.j2ssh.util.ExtensionClassLoader > add >> >> INFO: Adding C:\Program Files\Java\j2re1.4.0_03\lib\ext\ldapsec.jar >> to >> >> the >> >> extension classpath >> >> >> >> > >> >> > Am 08.01.2004 um 09:49 schrieb ura...@mi...: >> >> > >> >> >> >> >> >> Dear Sir, >> >> >> >> >> >> I am working on SSh your tools your tools are excellent sir.... >> >> >> >> >> >> i am able to run sftp,passwordconnect,portforwarding sir... >> >> > >> >> > Good. >> >> > >> >> >> >> >> >> i am running PublicKey Connect is running and when it ask private > key >> >> >> i tested with RSA,DSA,SSH-DSS i got authnentication fail sir... >> >> > >> >> > Have no idea. >> >> > >> >> >> >> >> >> please help me in getting that progam and i am working on >> >> >> executeCommand() method now but session is not starting sir...plz >> >> help >> >> >> me i am forwarding theprogramme... >> >> >> >> >> > >> >> > [snip...] >> >> > >> >> >> >> >> >> Ssh2Session session2 = ssh2.openSessionChannel(80,24); >> >> >> //Ssh2Session session2 = new Ssh2Session(80,24); >> >> >> session2.setEnvironmentVariable("name","value"); >> >> >> >> >> >> System.out.print("\n\n\n ****now in session >> >> >> ***************\n\n\n"); >> >> >> >> >> >> System.out.print("\n\n\n ****ssh.openSessionChannel >> >> >> ***************\n\n\n"); >> >> >> //System.out.print(ssh.openSessionChannel()); >> >> >> >> >> >> if(session2.requestPseudoTerminal("vt100",80,24,0,0)) { >> >> >> >> >> >> System.out.print("\n\n\n >> >> >> ****session.requestPseudoTerminal***************\n\n\n"); >> >> >> //System.out.println(session2.requestPseudoTerminal("vt100")); >> >> >> session2.startShell(); >> >> > ^^^^^^^^^^ >> >> >> >> >> >> >> >> >> System.out.print("\n\n\n ****now in >> >> >> session.startShell******\n\n\n"); >> >> >> System.out.print(session2.startShell()); >> >> > >> >> > A second time "startShell()", check, if the first call succeeds. >> >> > >> >> >> >> >> >> >> >> >> session2.getOutputStream().write("ls\n".getBytes()); >> >> > >> >> > A session2.getOutputStream().flush() could help. >> >> > >> >> >> } >> >> >> } else { >> >> >> System.out.println("Authentication failed"); >> >> >> >> >> > >> >> > [...snap] >> >> > >> >> > If your want to execute Shell commands on the remote shell, >> >> > you just can use "executeCommand()" method of >> "SessionChannelClient". >> >> > There is no need to request a Pseudo Terminal or to execute >> >> > "startShell()". >> >> > >> >> > >> >> > so long, >> >> > Manfred >> >> > >> >> >> >> >> >> >> >> ----------------------------------------- >> >> This email was sent using DACafeMail. >> >> Get Your FREE 10 MB eMail Account Now. >> >> http://cafemail.dcccafe.com >> >> >> >> >> >> ------------------------------------------------------- >> >> This SF.net email is sponsored by: Perforce Software. >> >> Perforce is the Fast Software Configuration Management System >> offering >> >> advanced branching capabilities and atomic changes on 50+ platforms. >> >> Free Eval! http://www.perforce.com/perforce/loadprog.html >> >> _______________________________________________ >> >> Sshtools-users mailing list >> >> Ssh...@li... >> >> https://lists.sourceforge.net/lists/listinfo/sshtools-users >> > >> > >> > >> > ------------------------------------------------------- >> > This SF.net email is sponsored by: Perforce Software. >> > Perforce is the Fast Software Configuration Management System offering >> > advanced branching capabilities and atomic changes on 50+ platforms. >> > Free Eval! http://www.perforce.com/perforce/loadprog.html >> > _______________________________________________ >> > Sshtools-users mailing list >> > Ssh...@li... >> > https://lists.sourceforge.net/lists/listinfo/sshtools-users >> > >> >> >> >> >> >> ----------------------------------------- >> This email was sent using DACafeMail. >> Get Your FREE 10 MB eMail Account Now. >> http://cafemail.pcbcafe.com >> > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Perforce Software. > Perforce is the Fast Software Configuration Management System offering > advanced branching capabilities and atomic changes on 50+ platforms. > Free Eval! http://www.perforce.com/perforce/loadprog.html > _______________________________________________ > Sshtools-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/sshtools-users > ----------------------------------------- This email was sent using DACafeMail. Get Your FREE 10 MB eMail Account Now. http://cafemail.pcbcafe.com |