Hi, What is the command to use with scp and sftp in UNIX, to transfer files as ASCII ? I know that in FTP , we have the parameter "ascii" , but, how about openssh? How can I make a script in UNIX using scp or sftp where I do not have to type the password ? I mean, there is a password , but I don?t know where I should put it . In a file ? Into the script ? regards, Jorge Cleber JUNIOR cleber.junior at atl.com.br ATL - Algar Telecom Leste IT - System Security Office (SSO) Tel: (21) 2528-9303 ===================================================================O conte?do desta mensagem e todos os seus anexos s?o para uso restrito, confidencial e est?o protegidos legalmente, sendo endere?ado somente ao(s) destinat?rio(s) e n?o deve ser divulgado sem pr?via autoriza??o. Se voc? n?o ? o destinat?rio desta mensagem, ou o respons?vel pela entrega desta, voc? n?o est? autorizado a revelar, copiar, distribuir ou reter esta mensagem ou qualquer parte da mesma. O uso impr?prio ser? tratado conforme as normas da ATL - Algar Telecom Leste Ltda. Opini?es, conclus?es, ou outras informa??es nesta mensagem que n?o se relacionam com a linha de neg?cios da ATL devem ser compreendidas como n?o sendo fornecidas e nem de responsabilidades desta empresa. ====================================================================
Jorge Cleber Teixeira de Almeida Junior writes: > Hi, You have two questions, not two doubts. Doubt is being unsure about whether something is true. > What is the command to use with scp and sftp in UNIX, to transfer files > as ASCII ? > > I know that in FTP , we have the parameter "ascii" , but, how about openssh? scp and sftp transfer files in binary mode only. There is no "ascii" mode for sftp. > How can I make a script in UNIX using scp or sftp where I do not have to > type the password ? I mean, there is a password , but I don?t know where I > should put it . In a file ? Into the script ? Actually, you can use identity keys to avoid having to give a password to authenticate to remote hosts. Read the man page for ssh-keygen and the sections in the man pages for ssh and sshd about RSA authentication.
Yo Jorge! IMHO, file transfer programs should NEVER munge the contents of a file. The "ascii" feature in ftp is probably one of the top ten all time PITA for tech support folks. All it does on a good day is tranlate M$DO$ line end to UNIX line end. On any other day it just destroys everything else. If you really need to change M$DO$ \r\n in to UNIX \n then get a separate program to do it. Or use tr like this: tr -d '\r' < infile > outfile Most unix also has "fromdos" and "todos" to make it even more idiot proff. You can also get similar programs for the M$DO$ end. RGDS GARY --------------------------------------------------------------------------- Gary E. Miller Rellim 20340 Empire Blvd, Suite E-3, Bend, OR 97701 gem at rellim.com Tel:+1(541)382-8588 Fax: +1(541)382-8676 On Thu, 18 Apr 2002, Jorge Cleber Teixeira de Almeida Junior wrote:> What is the command to use with scp and sftp in UNIX, to transfer files > as ASCII ? > > I know that in FTP , we have the parameter "ascii" , but, how about openssh? > > How can I make a script in UNIX using scp or sftp where I do not have to > type the password ? I mean, there is a password , but I don?t know where I > should put it . In a file ? Into the script ?