public void sendIgnore() throws Exception{ Buffer buf=new Buffer(); Packet packet=new Packet(buf); packet.reset(); buf.putByte((byte)SSH_MSG_IGNORE); write(packet); }
public void sendIgnore() throws Exception{ Buffer buf=new Buffer(); Packet packet=new Packet(buf); packet.reset(); buf.putByte((byte)SSH_MSG_IGNORE); write(packet); }
private void sendPacketPath(byte fxp, byte[] path) throws Exception{ packet.reset(); putHEAD(fxp, 9+path.length); buf.putInt(seq++); buf.putString(path); // path getSession().write(packet, this, 9+path.length+4); } private void sendPacketPath(byte fxp, byte[] p1, byte[] p2) throws Exception{
public void sendKeepAliveMsg() throws Exception{ Buffer buf=new Buffer(); Packet packet=new Packet(buf); packet.reset(); buf.putByte((byte)SSH_MSG_GLOBAL_REQUEST); buf.putString(keepalivemsg); buf.putByte((byte)1); write(packet); }
private void send(byte[] message){ packet.reset(); wbuf.putByte((byte)Session.SSH_MSG_CHANNEL_DATA); wbuf.putInt(recipient); wbuf.putInt(4+message.length); wbuf.putString(message); try{ getSession().write(packet, this, 4+message.length); } catch(Exception e){ } }
public void sendKeepAliveMsg() throws Exception{ Buffer buf=new Buffer(); Packet packet=new Packet(buf); packet.reset(); buf.putByte((byte)SSH_MSG_GLOBAL_REQUEST); buf.putString(keepalivemsg); buf.putByte((byte)1); write(packet); }
private void send(byte[] message){ packet.reset(); wbuf.putByte((byte)Session.SSH_MSG_CHANNEL_DATA); wbuf.putInt(recipient); wbuf.putInt(4+message.length); wbuf.putString(message); try{ getSession().write(packet, this, 4+message.length); } catch(Exception e){ } }
private void send_newkeys() throws Exception { // send SSH_MSG_NEWKEYS(21) packet.reset(); buf.putByte((byte)SSH_MSG_NEWKEYS); write(packet); if(JSch.getLogger().isEnabled(Logger.INFO)){ JSch.getLogger().log(Logger.INFO, "SSH_MSG_NEWKEYS sent"); } }
public void sendKeepAliveMsg() throws Exception { Buffer buf = new Buffer(); Packet packet = new Packet(buf); packet.reset(); buf.putByte((byte) SSH_MSG_GLOBAL_REQUEST); buf.putString(keepalivemsg); buf.putByte((byte) 1); write(packet); }
public void noMoreSessionChannels() throws Exception{ Buffer buf=new Buffer(); Packet packet=new Packet(buf); packet.reset(); buf.putByte((byte)SSH_MSG_GLOBAL_REQUEST); buf.putString(nomoresessions); buf.putByte((byte)0); write(packet); }
public void sendKeepAliveMsg() throws Exception{ Buffer buf=new Buffer(); Packet packet=new Packet(buf); packet.reset(); buf.putByte((byte)SSH_MSG_GLOBAL_REQUEST); buf.putString(keepalivemsg); buf.putByte((byte)1); write(packet); }
private void sendOPEN(byte[] path, int mode) throws Exception{ packet.reset(); putHEAD(SSH_FXP_OPEN, 17+path.length); buf.putInt(seq++); buf.putString(path); buf.putInt(mode); buf.putInt(0); // attrs getSession().write(packet, this, 17+path.length+4); } private void sendPacketPath(byte fxp, byte[] path) throws Exception{
private void sendSETSTAT(byte[] path, SftpATTRS attr) throws Exception{ packet.reset(); putHEAD(SSH_FXP_SETSTAT, 9+path.length+attr.length()); buf.putInt(seq++); buf.putString(path); // path attr.dump(buf); getSession().write(packet, this, 9+path.length+attr.length()+4); } private void sendREMOVE(byte[] path) throws Exception{
private void sendSETSTAT(byte[] path, SftpATTRS attr) throws Exception { packet.reset(); putHEAD(SSH_FXP_SETSTAT, 9 + path.length + attr.length()); buf.putInt(seq++); buf.putString(path); attr.dump(buf); getSession().write(packet, this, 9 + path.length + attr.length() + 4); }
private void sendSETSTAT(byte[] path, SftpATTRS attr) throws Exception{ packet.reset(); putHEAD(SSH_FXP_SETSTAT, 9+path.length+attr.length()); buf.putInt(seq++); buf.putString(path); // path attr.dump(buf); getSession().write(packet, this, 9+path.length+attr.length()+4); } private void sendREMOVE(byte[] path) throws Exception{
private void sendMKDIR(byte[] path, SftpATTRS attr) throws Exception{ packet.reset(); putHEAD(SSH_FXP_MKDIR, 9+path.length+(attr!=null?attr.length():4)); buf.putInt(seq++); buf.putString(path); // path if(attr!=null) attr.dump(buf); else buf.putInt(0); getSession().write(packet, this, 9+path.length+(attr!=null?attr.length():4)+4); } private void sendRMDIR(byte[] path) throws Exception{
private void sendMKDIR(byte[] path, SftpATTRS attr) throws Exception{ packet.reset(); putHEAD(SSH_FXP_MKDIR, 9+path.length+(attr!=null?attr.length():4)); buf.putInt(seq++); buf.putString(path); // path if(attr!=null) attr.dump(buf); else buf.putInt(0); getSession().write(packet, this, 9+path.length+(attr!=null?attr.length():4)+4); } private void sendRMDIR(byte[] path) throws Exception{
protected void sendOpenConfirmation() throws Exception{ Buffer buf=new Buffer(100); Packet packet=new Packet(buf); packet.reset(); buf.putByte((byte)SSH_MSG_CHANNEL_OPEN_CONFIRMATION); buf.putInt(getRecipient()); buf.putInt(id); buf.putInt(lwsize); buf.putInt(lmpsize); getSession().write(packet); }
protected void sendOpenConfirmation() throws Exception{ Buffer buf=new Buffer(100); Packet packet=new Packet(buf); packet.reset(); buf.putByte((byte)SSH_MSG_CHANNEL_OPEN_CONFIRMATION); buf.putInt(getRecipient()); buf.putInt(id); buf.putInt(lwsize); buf.putInt(lmpsize); getSession().write(packet); }
protected void sendOpenConfirmation() throws Exception{ Buffer buf=new Buffer(100); Packet packet=new Packet(buf); packet.reset(); buf.putByte((byte)SSH_MSG_CHANNEL_OPEN_CONFIRMATION); buf.putInt(getRecipient()); buf.putInt(id); buf.putInt(lwsize); buf.putInt(lmpsize); getSession().write(packet); }