Guest User

Untitled

a guest
Apr 26th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. const userInfo = "sanzhar"
  2. const passInfo = "unist"
  3.  
  4. const jsftp = require("jsftp");
  5. const Ftp = new jsftp({
  6. host: "mico.knu.ac.kr",
  7. port: 22, // defaults to 21
  8. user: userInfo, // defaults to "anonymous"
  9. pass: passInfo // defaults to "@anonymous"
  10.  
  11. });
  12.  
  13. Ftp.ls(".", (err, res) => {
  14. res.forEach(file => console.log(file.name));
  15. });
  16.  
  17. Ftp.raw("quit", (err, data) => {
  18. if (err) {
  19. return console.error(err);
  20. }
  21.  
  22. console.log("Bye!");
  23. });
Add Comment
Please, Sign In to add comment